Place API key in Headers or URL

前端 未结 5 1024
感动是毒
感动是毒 2020-12-04 09:53

I\'m designing a public API to my company\'s data. We want application developers to sign up for an API key so that we can monitor use and overuse.

Since the API is

5条回答
  •  独厮守ぢ
    2020-12-04 10:10

    I would not put the key in the url, as it does violate this loose 'standard' that is REST. However, if you did, I would place it in the 'user' portion of the url.

    eg: http://me@example.com/myresource/myid

    This way it can also be passed as headers with basic-auth.

提交回复
热议问题