Closed tiwillia closed 6 years ago
Hi @tiwillia, We are no longer using API keys for authorization. Instead we are using access tokens. Via the API directly you can use the bearer token header but we have not update all the SDKs yet to use bearer tokens. But it is implemented so that you can use new access tokens in via basic auth which was used for api keys. This means the access token should be used in place of the appID and the second field should be empty: ic := intercom.NewClient(os.Getenv("AT"), "") Maybe I am missing something but are you saying this is not working when you implement it as described in the README? That should work. But as noted, we are trying to update the SDKs in relation to bearer token headers so that would replace the basic auth method. Let me know if you Thanks Cathal
I am going to track thus under #61 since it relates to bearer token and API access. If you have any other questions on that please update that issue
Version info
Expected behavior
The HTTPClient has an AppID field and an APIKey field. The code suggests that
NewClient
accepts two parameters, an AppID first and an APIKey second. I expect to create a new client with the following and for it to work:Actual behavior
The usage of the AppID and APIKey fields in the IntercomHTTPClient appear to be swapped. The app ID provided is sent to intercom as the APIKey, and the APIKey sent as the app ID
Steps to reproduce
appID
andaccessToken
with the application ID and access token:I've provided a small test script that demonstrates the issue:
The README appears to suggest the proper way to create the client, providing the accessToken as the first parameter to
NewClient
. However,NewClient
is written in a way that describe the parameters to be swapped.