Best approach for generating API key

后端 未结 5 1920
轮回少年
轮回少年 2020-12-04 07:37

So with lots of different services around now, Google APIs, Twitter API, Facebook API, etc etc.

Each service has an API key, like:

AIzaSyClzfrOzB818x55

5条回答
  •  情书的邮戳
    2020-12-04 08:14

    I use UUIDs, formatted in lower case without dashes.

    Generation is easy since most languages have it built in.

    API keys can be compromised, in which case a user may want to cancel their API key and generate a new one, so your key generation method must be able to satisfy this requirement.

提交回复
热议问题