401 "No valid API token provided" When Calling Prototype APIs
Con rispostaHello! I'm trying to call the prototype "Audits" endpoint (prototype/platform/audits) to pull a list of audits from the API. I'm doing this with an automated script, but I pulled out the bearer token into a curl to demonstrate because that's not working either.
Calling a non-prototype endpoint works (i.e. when I call it, I get a response that I expect):
curl -X GET https://api.app.wdesk.com/platform/v1/graph/types -H 'Accept: application/json' -H 'Authorization: Bearer ey...'
This, however, does not, even using the same bearer token:
curl -X GET https://api.app.wdesk.com/prototype/platform/audits/<stubbed> -H 'Accept application/json' -H 'Authorization: Bearer ey...'
The only thing I get in response is:
{"code":"401Unauthorized","message":"No valid API token provided","documentationUrl":"https://developers.workiva.com/prototype-platform/prototype-getaudits/?rel=error"}
Do I have to do something specific to allow-list the prototype API for my tenant or is there another way of obtaining bearer tokens for the prototype endpoints?
-
Hi Devan Birmingham,
Authorization for the prototype APIs is the same a the production APIs. More information here https://developers.workiva.com/prototype-platform/prototype-authentication/. I did successfully test the endpoint to retrieve a list of audits. You may want to include the verbose option to help with troubleshooting. Below is an example. Make sure that your API Grant has the necessary scope(s) (the example below requires graph:read) and that the username associated with your Grant has permissions to perform the operations. Then request a new bearer token, and within 10 minutes, try the example below:
curl -v GET https://api.app.wdesk.com/prototype/platform/audits --header "Accept: application/json" --header "Authorization: Bearer <TOKEN>"
0Accedi per aggiungere un commento.
Commenti
1 commento