How to pass access token to API call using python?



how can i pass the access token when calling intercom API using python?

import requests
r = requests.get(url) #how to send the access token with the url ?



Hey @ammar.khwaira - Python is not an officially supported SDK yet, so from an Intercom point-of-view, it’s difficult for me to say.

However, as a member of the community, I can say that the below should work with the requests package :wink: More here!

import requests

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