Skip to main content
Answered

Requesting contact by its ID via API - Not Found error

  • July 20, 2023
  • 1 reply
  • 78 views

Using the legacy users API endpoint, I can lookup a user by its User ID:

```
In [36]: INTERCOM_API._wrapped_api._session.get("https://api.intercom.io/users?user_id=64b9893ad6e27c3ffdeda313").json()['id']
Out[36]: '64b9893b1c83c9c6ed44a05c'
```

The same ID I see in the UI, all good:

But when I’m trying to access this user (contact?) using the new API, I get 404:

```

In [37]: INTERCOM_API._wrapped_api._session.get("https://api.intercom.io/contacts/64b9893b1c83c9c6ed44a05c").json()
Out[37]:
{'type': 'error.list',
 'request_id': '001lpi4kfnoevvqlhh30',
 'errors': [{'code': 'not_found', 'message': 'Contact Not Found'}]}

```

Please advise.

Best answer by Eden

Hey @Anton Koval 👋 Eden from the support engineer team here.

 

Can you confirm that you are using the correct access token for the app that you are making this request to? You will want to make sure that the access token doesn’t show a warning that it needs an update as well. 

 

To locate the access tokens for your workspace, go to the Developer Hub and then navigate to Your Apps.


Here you'll find a list of all the apps you've built, including the workspace the app is installed on and the production workspace's access token. Once you've located the correct app, you'll want to click on the app's name. This will take you to the app's basic information view, like this 👇


To update the access token associated with that app in your workspace, you'll need to navigate to Test and Publish > Your workspaces:

 

There you will see the ability to regenerate the access token for that app that is connected to your workspace, if needed. 👍

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

1 reply

Eden
Employee
Forum|alt.badge.img
  • Premier Customer Support Engineer
  • 121 replies
  • Answer
  • July 26, 2023

Hey @Anton Koval 👋 Eden from the support engineer team here.

 

Can you confirm that you are using the correct access token for the app that you are making this request to? You will want to make sure that the access token doesn’t show a warning that it needs an update as well. 

 

To locate the access tokens for your workspace, go to the Developer Hub and then navigate to Your Apps.


Here you'll find a list of all the apps you've built, including the workspace the app is installed on and the production workspace's access token. Once you've located the correct app, you'll want to click on the app's name. This will take you to the app's basic information view, like this 👇


To update the access token associated with that app in your workspace, you'll need to navigate to Test and Publish > Your workspaces:

 

There you will see the ability to regenerate the access token for that app that is connected to your workspace, if needed. 👍


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