Skip to main content
Answered

Start a conversation programatically stopped working

  • February 16, 2024
  • 9 replies
  • 111 views

Forum|alt.badge.img

Hello Dear Intercom-Support-Team, 
as of recently we noticed a strange behavior in our application and it is no longer possible to start a conversation programmatically from our application. The server returns 400 http error on request.

We have not changed anything in the intercom settings (I have asked the entire support team) SDK Keys are not expired or so, and have been never changed. Other functions of Intercom Messenger are not affected.

Could You please help here, as we use this functionality to provide our customers the possibility to send us Device Logs.

Mobile Platforms affected: iOS, Android (both native Apps)

Intercom SDK Version: 15.5.0 (also tested with 15.6.2 the same behaviour)
 

POST https://jabaugui-android.mobile-messenger.intercom.com/messenger/mobile/conversations
Request:
{
  "body" : "App: lexoffice Android, Version 267 ….",
  "from" : {
    "id" : "{id here}",
    "type" : "user"
  },
  "app_id" : "{app id here}",
  "hmac" : "{hmac string here}",
  "user" : {
    "email" : "{my email here}",
    "type" : "user",
    "user_id" : "{user id here}"
  }
}



Response:
 

400 POST https://jabaugui-android.mobile-messenger.intercom.com/messenger/mobile/conversations

cache-control:no-cache
content-encoding:gzip
content-type:application/json; charset=utf-8
date:Fri, 16 Feb 2024 12:22:19 GMT
server:nginx
status:400 Bad Request
strict-transport-security:max-age=31536000
vary:Accept,Accept-Encoding
x-intercom-version:ae8c66d841ff238ea75264a694cb18faa958b982
x-request-id:0000dl33g36r9ir9u7kg
x-request-queueing:0
x-runtime:0.068291

�??{S�e??�Q
�0D����Pګ���]b01qwS(�w7u~߼�l��H�S�j0�����s%�el�w蝿�0�6x:&*
f6�9~L] �*����^��{Z]�j*H�Da��???????��??�Ί??????

 

Best answer by Jacob Cox

Artiom C wrote:

Hi Mateusz,
in the initial post I mentioned all the details, in the response header you can find the request id.

I also tried to make a request with the Bearer Authentication with Access Token to (https://api-iam.eu.intercom.io) as mentioned in the documentation but also unsuccessful - there I receive http error 401. 

https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/createConversation/

Hey there @Artiom C !

I can see that my teammate Eden is helping you out with your mobile API question in a Support conversation. I’ll let her continue to help you out on that one. Regarding our REST API which you referenced above, I should note that the URL that the URL that you mentioned above is incorrect. You should be using https://api.intercom.io/ {insert endpoint}. EU URLs are only for workspaces that have their data hosted in the EU. So if you are based in the EU, but have your data hosted in the U.S. you would use https://api.intercom.io (also note that it’s simply “api”, not “api-iam”.

Hope that helps with part of your issue at least!

View original
Did this topic help you find an answer to your question?

9 replies

mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Artion, It’s Mat from the Support Engineering Team 😀

A 400 error usually means that you don’t have access to the resources you are trying to get.

In this case, I would recommend resetting your API access token in the Developer Hub.

Please let me know if you have any questions about this 😸


Forum|alt.badge.img
  • Author
  • Connector
  • 6 replies
  • February 22, 2024
mateusz.leszkiewicz wrote:

Hi Artion, It’s Mat from the Support Engineering Team 😀

A 400 error usually means that you don’t have access to the resources you are trying to get.

In this case, I would recommend resetting your API access token in the Developer Hub.

Please let me know if you have any questions about this 😸

Hey, thanks for your answer, yesterday tried to find out solution for that, and had no success. We actually do not use API Access Tokens and any apps for the SDK Integration. For the Authentication we use just Basic method with App Id and Android Api Key (so they should not expire I think). 

Just for the context: we used the conversations API not from the android SDK but called the endpoint directly using public API.

https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/createConversation/

not sure what is changed in the API from the last update but it stopped working. I also checked this with the right headers and Bearer Authentication (as described in the API) and created the app in the developer Hub - also nothing. 


 


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Artiom, 

Can you please send us a message and share the details (especially the syntax of the request and request ID)?

It will allow us to investigate what's the issue (and fix it if it is on us). 


Forum|alt.badge.img
  • Author
  • Connector
  • 6 replies
  • February 23, 2024

Hi Mateusz,
in the initial post I mentioned all the details, in the response header you can find the request id.

I also tried to make a request with the Bearer Authentication with Access Token to (https://api-iam.eu.intercom.io) as mentioned in the documentation but also unsuccessful - there I receive http error 401. 

https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/createConversation/


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Artion,

I can see that, but we have access only to the logs that are no older than 7 days, and it might be easier to track the issue if you start a conversation in Messenger with us. We will definitely need you to recreate the issue one more time to see what’s going on and document it properly.

Can you do that please?


Forum|alt.badge.img
  • Author
  • Connector
  • 6 replies
  • February 23, 2024

Sorry, of course! I will do so… Thanks for support!


mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Grand!

See you in on the other side 😎


Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • 441 replies
  • Answer
  • February 24, 2024
Artiom C wrote:

Hi Mateusz,
in the initial post I mentioned all the details, in the response header you can find the request id.

I also tried to make a request with the Bearer Authentication with Access Token to (https://api-iam.eu.intercom.io) as mentioned in the documentation but also unsuccessful - there I receive http error 401. 

https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/createConversation/

Hey there @Artiom C !

I can see that my teammate Eden is helping you out with your mobile API question in a Support conversation. I’ll let her continue to help you out on that one. Regarding our REST API which you referenced above, I should note that the URL that the URL that you mentioned above is incorrect. You should be using https://api.intercom.io/ {insert endpoint}. EU URLs are only for workspaces that have their data hosted in the EU. So if you are based in the EU, but have your data hosted in the U.S. you would use https://api.intercom.io (also note that it’s simply “api”, not “api-iam”.

Hope that helps with part of your issue at least!


Forum|alt.badge.img
  • Author
  • Connector
  • 6 replies
  • March 6, 2024

Thanks Jacob, I have tried the public API and figured out how to fix the conversations in our situation. Cheers!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings