-
Notifications
You must be signed in to change notification settings - Fork 53
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
Client.cs uses HttpBasicAuthenticator which appends invalid header #107
Comments
Hey @ladotonia! This library already supports Access Tokens through this part of the code: intercom-dotnet/src/Intercom/Core/Client.cs Lines 296 to 306 in 14f0990
It works correctly if you send the access token as the app_id with the password as an empty string, which is what this library is doing for now. We have plans to make sure it matches what the API docs refer but considering we had API keys until recently, it was postponed until we deprecate API keys for good. Are you having problems sending requests? |
Hi @kmossco, I did try using the single argument constructor for Intercom.core.Authentication using only my access token. I am unable to create a new Contact or User through the .net SDK, however when I directly hit the rest api the same command is successful. The main difference I was noticing, was that the api mentions to send the access key in plain text as Here is my sdk code snippet:
user is always null, as is the resturn from intercomClient.List(); |
Hey again @ladotonia! Just to be sure, is ContactsClient intercomClient = new ContactsClient(new Authentication("MyPersonalAccessToken"));
Contact user = intercomClient.Create(new Contact() { user_id = id, email = email }); Is it possible that you are using some other library than ours? I also can't find the |
The |
Gotcha, the reason I asked is that there is an unofficial client called I'll add this to the roadmap of things to get fixed, but if you have the time/resources feel free to send us a PR to address this. Happy to review it and thank you for reporting this! Just to set the proper expectations, we are currently looking to push the PR #97 forward and then we will focus on bringing pagination to the SDK. So I will probably only have time to address this after that is implemented. 👍 |
HttpBasicAuthenticator appends the header:
while all the api docs suggest using the header -H 'Authorization:Bearer <access_token>'
Are access tokens supported in this SDK? or does the authenticator need to be updated to support the updated api?
The text was updated successfully, but these errors were encountered: