intercom-go icon indicating copy to clipboard operation
intercom-go copied to clipboard

When will support for new Personal Access Tokens instead of API Keys begin?

Open briemarie opened this issue 9 years ago • 5 comments

According to the Intercom docs, API Keys are deprecated and will be fully replaced with a Personal Access Token in January 2017. I was expecting NewClient to support this change already ie. ic := intercom.NewClient("appID", "apiKey") would be ic := intercom.NewClient("pat")

When can we expect the package to update to support this change?

briemarie avatar Nov 30 '16 00:11 briemarie

Hi @briemarie - this should work right now by passing the PAT where you would normally pass the appID, and send an empty string where the API key would normally be.

josler avatar Dec 09 '16 15:12 josler

The API documentation for Personal Access Tokens is explicit about using the Bearer authorization type. It looks like the solution mentioned above works since the Basic authorization type is overloaded to accept a PAT where username usually goes.

@josler I can't find any documentation for the overloading. Is that a stable API feature I can depend on?

timhudson avatar Jan 11 '17 06:01 timhudson

Hey @timhudson The API documentation recommend to use bearer tokens but basic auth should work too so you can safely use @josler's solution above.

kant01ne avatar Jan 11 '17 09:01 kant01ne

Just to note that we did update the README here to clarify how to use access tokens to authorize access ic := intercom.NewClient("access_token", "") But we will create bearer access for this once we get a chance so will leave it open for now

choran avatar Aug 21 '17 15:08 choran

This also needs to be updated in the GoDoc (https://godoc.org/gopkg.in/intercom/intercom-go.v2#NewClient). It just misled me and resulted in a fair bit of time debugging.

zwass avatar Apr 12 '18 21:04 zwass