微信小程序
- AppID 小程序唯一凭证
- AppSecret 小程序唯一凭证密钥
https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getAccessToken.html
https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_access_token.html
# 通过 AppID 和 AppSecret 获取 AccessToken
GET https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
{
"access_token":"ACCESS_TOKEN",
"expires_in":7200
}
API Key and Secret
The API Key and Secret (also known as Consumer Key and Secret) are the most fundamental credentials required to access the Twitter API. These credentials act as the username and password for your Twitter App, and are used by the Twitter API to understand which App requests are coming from.
These credentials can be used by authentication endpoints to generate additional credentials, such as user Access Tokens and Secrets, and Bearer Tokens. You also need to use these credentials along with Access Tokens and other authorization parameters to authorize requests that require OAuth 1.0a User Context authentication.
API 密钥和秘密(也称为消费者密钥和秘密)是访问 Twitter API 所需的最基本的凭据。这些凭据作为您的 Twitter 应用程序的用户名和密码起作用,并由 Twitter API 用于识别哪些应用程序请求来自您的应用程序。
这些凭据可以由身份验证端点生成其他凭据,例如用户访问令牌和密钥以及 Bearer 令牌。您还需要使用这些凭据以及访问令牌和其他授权参数来授权需要 OAuth 1.0a 用户上下文身份验证的请求。
- https://api.weibo.com/oauth2/authorize?client_id=123456&redirect_uri=http://www.example.com/response&response_type=code
- http://www.example.com/response?code=CODE
-
https://api.weibo.com/oauth2/access_token
{ "access_token": "ACCESS_TOKEN", "expires_in": "7200", "remind_in": "7200", "uid": "1404376560" }
-
https://api.weibo.com/oauth2/get_token_info
{ "uid": 1073880650, "appkey": 1352222456, "scope": null, "create_at": 1352267591, "expire_in": 157679471 }
Aliyun
- AccessKey ID
- AccessKey Secret
访问密钥 AccessKey(简称 AK)是阿里云提供给用户的永久访问凭据,一组由 AccessKey ID 和 AccessKey Secret 组成的密钥对。
- AccessKey ID:用于标识用户。
- AccessKey Secret:是一个用于验证您拥有该 AccessKey ID 的密码。
AccessKey ID 和 AccessKey Secret 根据算法由访问控制(RAM)生成,阿里云对 AccessKey ID 和 AccessKey Secret 的存储及传输均进行加密。
AccessKey 不用于控制台登录,用于通过开发工具(API、CLI、SDK、Terraform 等)访问阿里云时,发起的请求会携带 AccessKey ID 和 AccessKey Secret 加密请求内容生成的签名,进行身份验证及请求合法性校验。
阿里云网关
- https://help.aliyun.com/zh/api-gateway/traditional-api-gateway/user-guide/call-an-api-operation-by-using-an-appcode
阿里云 API 网关提供多种针对客户端请求的安全认证方式,包括阿里云 APP 认证方式、Jwt 插件、第三方鉴权等。对于阿里云 APP 这种认证方式,目前您可以设置两种认证形式,分别是签名认证和简单认证(AppCode),本文将详细介绍简单认证(AppCode)方式的使用。
发布的 API 如果使用摘要签名认证方式(APP Key 和 APP Secret),客户端在调用 API 时,需要使用签名密钥对请求内容进行签名计算,并将签名同步传输给服务器端进行签名验证。API 网关提供的 SDK 内置了签名实现,您只需要将签名密钥配置在 SDK 中,即可实现发起携带正确签名的请求。如果您需要自己在客户端实现签名计算过程,可以参考本文档。
Twilio
HTTP requests to the API use HTTP basic authentication.
Use your Twilio Account SID as the username and your Auth Token (found in the Console) as the password for HTTP basic authentication when sending HTTP requests to Twilio.
向 API 发送 HTTP 请求时使用 HTTP 基本身份验证。
向 Twilio 发送 HTTP 请求时,使用您的 Twilio Account SID作为用户名,使用您在控制台中找到的 Auth Token 作为密码进行 HTTP 基本身份验证。
curl -G https://api.twilio.com/2010-04-01/Accounts \
-u <YOUR_ACCOUNT_SID>:<YOUR_AUTH_TOKEN>
GitHub
Some REST API endpoints for GitHub Apps and OAuth apps require you to use basic authentication to access the endpoint. You will use the app's client ID as the username and the app's client secret as the password.
一些 GitHub Apps 和 OAuth 应用程序的 REST API 端点需要您使用基本身份验证来访问该端点。您将使用应用程序的“客户端 ID”作为用户名,并使用“客户端密钥”作为密码。
For example:
curl --request POST \
--url "https://api.github.com/applications/YOUR_CLIENT_ID/token" \
--user "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
--header "Accept: application/vnd.github+json" \
--header "X-GitHub-Api-Version: 2022-11-28" \
--data '{
"access_token": "ACCESS_TOKEN_TO_CHECK"
}'
网易云信
应用是网易云信各项服务的基本业务单元,用来与您的本地工程做映射关联。创建应用则是使用网易云信提供的产品和服务的第一步。本文介绍如何在网易云信控制台中创建应用,以及创建后获取应用的凭证(AppKey 和 AppSecret)。
百度云
https://cloud.baidu.com/doc/Reference/s/Njwvz1wot
当您将 HTTP 请求发送到百度智能云时,您需要对您的请求进行签名计算,以便百度智能云可以识别您的身份。您将使用百度智能云的访问密钥来进行签名计算,该访问密钥包含访问密钥 ID(Access Key Id, 后文简称 AK)和秘密访问密钥(Secret Access Key, 后文简称 SK).
AWS
- access key ID
- secret access key
访问密钥是 IAM 用户或 AWS 账户根用户 的长期凭证。您可以使用访问密钥签署对 AWS CLI 或 AWS API 的编程请求(直接或使用 AWS 开发工具包)。有关更多信息,请参阅 适用于 API 请求的 AWS 签名版本 4。
访问密钥包含两部分:访问密钥 ID(例如 AKIAIOSFODNN7EXAMPLE)和秘密访问密钥(例如 wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)。您必须同时使用访问密钥 ID 和秘密访问密钥对请求执行身份验证。
当您创建访问密钥对时,将访问密钥 ID 和秘密访问密钥保存在一个安全位置。秘密访问密钥只能在创建密钥时检索到。如果您丢失了秘密访问密钥,则必须删除访问密钥并创建新的访问密钥。有关更多说明,请参阅 更新访问密钥。
每个用户最多可有两个访问密钥。