Can I pass my access token to Intercom's API using Python? | Community
Skip to main content
Answered

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

  • September 9, 2020
  • 1 reply
  • 109 views

Forum|alt.badge.img

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

Best answer by Eric Fitz

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')

1 reply

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • Answer
  • September 9, 2020

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')