https://discord.gg/botpress logo
Make a call to the createOrGetConversation API.
# 🤝help
s
I can't make a call to the createOrGetConversation API. My bot is using the Telegram channel, it has been working through Telegram for a while now. The API asks me for an integration Id or name. "message": "Must specify either integrationId or integrationAlias" And I make the listIntegrations call but it returns a 200 and without listing the integrations: {"integrations":[],"meta":{}} In addition, channel and tags are required so I enter the values: channel: Telegram tags: id: (Telegram identification number) Can you help me with what I'm doing wrong in the call?
w
for the integration id you must pass
x-integration-id
as a header
you can get the telegram integration id by going into your integrations, clicking "Telegram", and copying the ID in the url
s
I also tried it with the ID from the URL, but having it in the body of the Telegram channel always throws a: {"id":"147************","code":400,"type":"InvalidPayload","message":"Channel \"telegram\" is not defined on the integration \"intver_0******************\""}
w
i think that means your integration id is wrong
you have to copy everything after the intver_ i think
s
Yes, sorry, you are right. I got to the point where it recognizes the integration, but it tells me that it is not related to my bot ID. And my bot is integrated with Telegram. {"id":"0992******************","code":409,"type":"RelationConflict","message":"Integration with ID \"01K6DM**************\" is not associated with the bot \"9b****.....\""}
w
do you speak portuguese by any chance?
s
Spanish
w
oh :( no problem then!
i recommend you try doing getorcreateconversation through the runtime api
instead of the chat api
it's simpler in my experience
2 Views