Using Access Tokens

Using Access Tokens

To use your Access Token simply provide it as part of the authorization header when you make a request. Access Tokens use the bearer authorization header when you make a request. This just means you need to specify the bearer type in the header.

For more info on the bearer token framework please see the official spec

Alternatively, you can always use the help function in some of our SDKs to authorize via Access Tokens, which means you don't need to specify the header explicitly (as it is all done for you under the hood).

$ curl \
-s https://api.intercom.io/users/5321a20f72cdbb4192000013 \
-H 'Authorization:Bearer <access_token>' \
-H 'Accept:application/json'
Example access token requests via SDKs

intercom = Intercom::Client.new(token: '<access_token>');
{"token": '<access_token>'}
var client = new Intercom.Client({ token: '<access_token>' });

📘

We have access token helper function for most of our SDKs. However, if you cannot find any you can always use the previous API Key method for Access Tokens by simply leaving the password field empty.

Example access token in SDKs using API Key method

$client = new IntercomClient('<access_token>', '');
intercom = Intercom::Client.new(app_id: '<access_token>', api_key: '');