Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace API Keys with Personal Access Tokens #38

Open
nikunjve opened this issue Sep 26, 2016 · 2 comments
Open

Replace API Keys with Personal Access Tokens #38

nikunjve opened this issue Sep 26, 2016 · 2 comments

Comments

@nikunjve
Copy link

Intercom is replacing API keys with "Personal Access Tokens". Old requests will fail with effect from January 2017. Read more about here: https://developers.intercom.io/docs/personal-access-tokens

This module needs to be updated to handle this change.

@tarunc
Copy link
Owner

tarunc commented Oct 23, 2016

I haven't tried it but from Intercom's docs, it seems that passing in a personalAccessToken instead of an appId should just work (without passing in an apiKey) since both are accepted as http auth username parameters.

Thus, please try passing in a personalAccessToken as such

var options = {
  personalAccessToken: "your_access_token"
};

var intercom = new Intercom(options);
// OR can also be written as:
var intercom = new Intercom("your_access_token");

@jamesramsay
Copy link
Contributor

Unfortunately this doesn't work because there is validation that checks for the existence of apiKey: https://github.com/tarunc/intercom.io/blob/master/lib/intercom.io.js#L42

If that's all that's needed to fix the issue I'll open a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants