Loading...
Loading...
Compare original and translation side by side
| Auth Model | Products | Credentials Needed |
|---|---|---|
| Project-scoped (Basic or OAuth2) | Conversation API, Numbers, Fax, EST, 10DLC, Number Lookup, Provisioning | Project ID + Key ID + Key Secret |
| Application-scoped (Basic or Signed) | Voice API, Verification API, In-App Calling SDKs | Application Key + Application Secret |
| API key | Mailgun | API Key (username is literal |
Voice/Verification credentials are a separate credential set from project Access Keys (different dashboard pages and auth models). In multi-product SDK clients, you may provide both sets together, but do not substitute one set for the other.
| 认证模型 | 适用产品 | 所需凭证 |
|---|---|---|
| 项目级(基础认证或OAuth2) | Conversation API、Numbers、Fax、EST、10DLC、Number Lookup、Provisioning | Project ID + Key ID + Key Secret |
| 应用级(基础认证或签名认证) | Voice API、Verification API、In-App Calling SDKs | Application Key + Application Secret |
| API密钥 | Mailgun | API Key(用户名为固定值 |
Voice/Verification的凭证是独立的凭证集,与项目访问密钥不同(来自控制台的不同页面,采用不同的认证模型)。在多产品SDK客户端中,可同时提供这两类凭证,但不可互相替代。
curl -u YOUR_KEY_ID:YOUR_KEY_SECRET \
https://numbers.api.sinch.com/v1/projects/{PROJECT_ID}/activeNumberscurl -X POST https://auth.sinch.com/oauth2/token \
-d grant_type=client_credentials \
-u YOUR_KEY_ID:YOUR_KEY_SECRETaccess_token{ "access_token": "eyJ...", "token_type": "bearer", "expires_in": 3600 }Authorization: Bearer {access_token}https://auth.sinch.com/oauth2/tokenus.auth.sinch.comeu.auth.sinch.comcurl -u YOUR_KEY_ID:YOUR_KEY_SECRET \
https://numbers.api.sinch.com/v1/projects/{PROJECT_ID}/activeNumberscurl -X POST https://auth.sinch.com/oauth2/token \
-d grant_type=client_credentials \
-u YOUR_KEY_ID:YOUR_KEY_SECRETaccess_token{ "access_token": "eyJ...", "token_type": "bearer", "expires_in": 3600 }Authorization: Bearer {access_token}https://auth.sinch.com/oauth2/tokenus.auth.sinch.comeu.auth.sinch.comcurl -X POST -u YOUR_APP_KEY:YOUR_APP_SECRET \
https://calling.api.sinch.com/calling/v1/calloutscurl -X POST -u YOUR_APP_KEY:YOUR_APP_SECRET \
https://calling.api.sinch.com/calling/v1/calloutscurl -s --user 'api:YOUR_MAILGUN_API_KEY' \
https://api.mailgun.net/v3/{DOMAIN}/messagescurl -s --user 'api:YOUR_MAILGUN_API_KEY' \
https://api.mailgun.net/v3/{DOMAIN}/messagesus.conversation.api.sinch.comeu.conversation.api.sinch.comhttps://auth.sinch.com/oauth2/tokenus.conversation.api.sinch.comeu.conversation.api.sinch.comhttps://auth.sinch.com/oauth2/token| Error | Cause | Fix |
|---|---|---|
| Wrong credentials or expired token | Verify Key ID from Access Keys and use the Key Secret saved at creation time; if the secret was lost, create a new Access Key and re-request an OAuth2 token. Also inspect the |
| Wrong Application Key/Secret or signing error | Verify app credentials from Voice > Apps; ensure HMAC signing matches the algorithm spec |
| OAuth2 token works for Numbers but fails for Conversation | Wrong API base URL region | Ensure the API base URL matches the app's region (e.g., |
| Key doesn't have access to this project/product | Check Access Key scope in dashboard; ensure correct Project ID |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| 凭证错误或令牌过期 | 验证访问密钥中的Key ID是否正确,并使用创建时保存的Key Secret;若密钥丢失,请创建新的访问密钥并重新请求OAuth2令牌。同时检查 |
| Application Key/Secret错误或签名错误 | 验证Voice > 应用中的应用凭证是否正确;确保HMAC签名符合算法规范 |
| OAuth2令牌可用于Numbers API,但无法用于Conversation API | API基础URL区域错误 | 确保API基础URL与应用的区域匹配(例如,欧盟地区的应用使用 |
| 密钥无此项目/产品的访问权限 | 在控制台中检查访问密钥的权限范围;确保Project ID正确 |