Forum Discussion
Channel Advisor API Connection with auth key creation
- 4 years ago
Great! Cheers!
The response is in Json format, so you just need to add a step at the end of the custom function to extract access_token value. Don't forget to add a comma at the end of previous response step.
..................... response = Json.Document(Web.Contents(.......................)), access_token = response[access_token] in access_tokenJing
That produces the "error | invalid client" response.
I really only want order information at this point. When I tried it with https://api.channeladvisor.com/v1/orders as the URL, I got a different error:
Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer- SomeDataDude3 years ago
Advocate I
What is in the documentation from the API? Did you try to connect with for example Postman (https://www.postman.com/)? Did you get a succesvol connection?
If your not familiar with Postman:Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.- Anonymous3 years agoNot applicable
I'll try that. Thanks!
- Anonymous3 years agoNot applicable
SomeDataDude I set up Postman and was able to connect as follows:
GET https://api.channeladvisor.com/v1/ordersAuthorization: Bearer token (using the initial access token from Channel Advisor)
Body: none
When I try to enter a refresh token, the whole thing errors out.
How do I now take what is working in Postman and alter the initial code for the function and query? What I have tried is to enter that information into my initial code, but it doesn't work. It comes back and says something about connecting anonymously.