Closed zburk closed 3 years ago
Hmm I wasn't aware of this, but in the documentation for the reports section of the API they write:
You can authenticate in the reports API only with your API token. For HTTP Basic Auth you have to add the Authorization header with the request. The API token is the user name and the string 'api_token' is the password. Whenever possible please use the tools and interfaces provided by your http library to do Basic Auth (for example, curl uses the -u switch for that).
Pull request clarifying this would be welcome!
Thanks for the follow-up! I'll write it up
I was trying
getDetailedReportPDF
andgetSummaryReportPDF
usingsetAuthCredentials
but kept getting a401 Bad Request
error. When I switched to usingsetAPIKey
it worked fine. Is this a known issue that API tokens must be used for certain endpoints? Happy to update the docs if this is the case.