Skip to content
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

Getting "Authorization Failed" on Every API Call in Swagger #302

Open
jonathanmclarke opened this issue Dec 27, 2024 · 7 comments
Open

Getting "Authorization Failed" on Every API Call in Swagger #302

jonathanmclarke opened this issue Dec 27, 2024 · 7 comments
Milestone

Comments

@jonathanmclarke
Copy link

Please see the attached image. I'm trying to test the APIs, using a newly generated API key, and I'm getting the error "Authorization Failed" for every single attempt, across all endpoints. I've also tried different browsers, and different machines. Can you take a look, please, and advise accordingly? Many thanks for your help.

2024-12-27_15h59_52

@apreiter18
Copy link
Collaborator

@jonathanmclarke - the screenshot you attached to this issue suggests the URL ("gpo.congress.gov) is causing this issue.

I suggest using api.congress.gov to make sample requests; not gpo.congress.gov. Here is a sample that might help based on the screenshot above: https://api.congress.gov/v3/member?api_key=INSERT_YOUR_KEY

@jonathanmclarke
Copy link
Author

Hi, thanks for the getting back to me so quickly. I'll try that alternative URL, but, just so you're aware, that screenshot came from the congress.gov API swagger page, at https://gpo.congress.gov/#/member/member_list. How do I test using the swagger UI, when the url is enforcing the prefix of gpo? It looks as though it won't work again, based on what you've said, until the url is changed to have a prefix of api.

@apreiter18
Copy link
Collaborator

The page that we use is api.congress.gov; which is what we link to from the GitHub. We recommend bookmarking "api.congress.gov."

Here is a screenshot of the page:
image

All the endpoints are present on api.congress.gov, which allows users to generate sample calls in swagger. The api.congress.gov swagger is frequently updated with relevant updates, new endpoints, and changes.

@jonathanmclarke
Copy link
Author

Ok. Thanks. It looks like a Google search is returning the wrong url, then:
image

@apreiter18
Copy link
Collaborator

That is very strange @jonathanmclarke but I appreciate this information. I'll report this to our development team and see what we can do to fix this. Thank you!

@jonathanmclarke
Copy link
Author

No problem. Thanks for your fast responses.

@apreiter18
Copy link
Collaborator

Reopening this issue because we have a dev ticket to address this. Any updates will be published here.

@apreiter18 apreiter18 added this to the March 2025 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants