LibraryOfCongress / api.congress.gov

congress.gov API
642 stars 39 forks source link

*SERIOUS* API key proper usage unclear. #197

Closed HopeTS closed 6 months ago

HopeTS commented 8 months ago

In the API docs here the api_key is sent in the query string. However in the repo it says not to do that.

Gmanicus commented 8 months ago

I remembered reading that somewhere but had trouble finding where it said not to do so. It says it here: https://github.com/LibraryOfCongress/api.congress.gov/tree/main/api_client

The API key assigned to your organization is not meant to be shared. It should: ...

  • Not be given as an URL?=parameter, which may be recorded in transit and will be in server logs and metrics products.

Proper usage is as documented in the API schema. I believe the documentation given above is incorrect.

rbram commented 6 months ago

Hello. Thanks for your feedback. We have updated our documentation here: https://github.com/LibraryOfCongress/api.congress.gov/tree/main/api_client