Closed wfleming closed 6 years ago
Hi @wfleming
It looks like you may have been using an organization API key (as opposed to a personal auth token) when you were making API requests with the gem. Using an organization API key is not supported for some endpoints such as GET /organizations/:id/projects
. We plan on adding a more informative error message for this soon.
If you still have issues with the endpoint using a personal auth token, let us know.
Well boy do I feel silly @tobyhs. Thanks for your patient reply, sorry for the noise. The one part I'm still confusedf about is why I thought curl -H "Authorization: token my-auth-token" https://api.bugsnag.com/organizations/my-org-id/projects
worked for me when I filed this, but I'm sure I was also making some silly error in that case :man_shrugging:.
I'm writing a script to interact with our org's bugsnag data and getting a surprising 500 fetching the related projects of an org. My code (anonymized a bit) is:
Exception/Stacktrace:
Fetching other rels (e.g.
contributors
) in the same manner works successfully. Fetching the same URL viacurl -H "Authorization: token my-auth-token" https://api.bugsnag.com/organizations/my-org-id/projects
also works successfully, so I'm working on the belief right now that something about how the gem is constructing this request disagreed with an expectation of the API.Other details:
If there are other details I can provide about environment or inspection of any of the objects involved that would be helpful in understanding what caused this, please let me know. Thanks for your help.