Answered

Can I pass my access token to Intercom's API using Python?

  • 9 September 2020
  • 1 reply
  • 59 views

Userlevel 2
Badge

Can I pass my access token to Intercom's API using Python?

icon

Best answer by Eric Fitz 9 September 2020, 15:17

View original

1 reply

Userlevel 1

Python is not an officially supported SDK yet. However, the below should work with the requests package.

 

import requests

 

url = 'https://api.intercom.io/users?user_id=abcd#39;

headers = {'Authorization' : 'Bearer <Your access token>'}

 

r = requests.get(url, headers=headers)

 

Alternatively, you can install this third-party wrapper and use the below. Just bear in mind that it’s not officially supported.

 

from intercom.client import Client

intercom = Client(personal_access_token='my_personal_access_token')

Reply