curl --request GET 'https://api.voicecheap.ai/oauth/userinfo' \
--header "Authorization: Bearer $VOICECHEAP_ACCESS_TOKEN"
const input = {};
const response = await fetch('https://api.voicecheap.ai/oauth/userinfo', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.VOICECHEAP_ACCESS_TOKEN}`,
},
redirect: 'manual',
});
console.log(response.status, await response.text());
import os
import requests
response = requests.request(
"GET",
"https://api.voicecheap.ai/oauth/userinfo",
headers={"Authorization":"Bearer " + os.environ["VOICECHEAP_ACCESS_TOKEN"]},
timeout=120,
allow_redirects=False,
)
print(response.status_code, response.text)
OAuth and MCP protocol
Get the connected user identity
Read the identity claims granted to an OAuth connection.
GET
/
oauth
/
userinfo
curl --request GET 'https://api.voicecheap.ai/oauth/userinfo' \
--header "Authorization: Bearer $VOICECHEAP_ACCESS_TOKEN"
const input = {};
const response = await fetch('https://api.voicecheap.ai/oauth/userinfo', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.VOICECHEAP_ACCESS_TOKEN}`,
},
redirect: 'manual',
});
console.log(response.status, await response.text());
import os
import requests
response = requests.request(
"GET",
"https://api.voicecheap.ai/oauth/userinfo",
headers={"Authorization":"Bearer " + os.environ["VOICECHEAP_ACCESS_TOKEN"]},
timeout=120,
allow_redirects=False,
)
print(response.status_code, response.text)
Read the identity claims granted to an OAuth connection.
GET https://api.voicecheap.ai/oauth/userinfo
Authentication
Send an OAuth access token in Authorization: Bearer. The token must include openid; email claims also require email. API keys and query-string credentials are not accepted.Request examples
Follow the documented encoding and authentication for this route. The action API’s envelope and idempotency rules apply only to action invocations.curl --request GET 'https://api.voicecheap.ai/oauth/userinfo' \
--header "Authorization: Bearer $VOICECHEAP_ACCESS_TOKEN"
const input = {};
const response = await fetch('https://api.voicecheap.ai/oauth/userinfo', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.VOICECHEAP_ACCESS_TOKEN}`,
},
redirect: 'manual',
});
console.log(response.status, await response.text());
import os
import requests
response = requests.request(
"GET",
"https://api.voicecheap.ai/oauth/userinfo",
headers={"Authorization":"Bearer " + os.environ["VOICECHEAP_ACCESS_TOKEN"]},
timeout=120,
allow_redirects=False,
)
print(response.status_code, response.text)
Response
Read the identity claims granted to an OAuth connection.HTTP 200
{
"sub": "voicecheap-user-id",
"email": "customer@example.com",
"email_verified": false
}
Response headers
{
"Cache-Control": "no-store",
"Pragma": "no-cache"
}
Operation notes
- OpenID Connect endpoints return HTTP 404 when identity integration is unavailable in this environment. Check discovery before relying on identity features.
- sub is the stable account identifier. email and email_verified are included only when email was granted and the account has an email address. email_verified reflects the actual verification status and may be false. Deleted or disabled accounts cannot use UserInfo.
Errors
| HTTP status | Code | Meaning or recovery |
|---|---|---|
| 400 | invalid_request | Send the OAuth access token only in the Authorization header. API keys and access_token/api_key credentials in the query or body are rejected. |
| 401 | invalid_token | The OAuth access token is missing, invalid, expired, revoked, or no longer authorized. Reconnect the account. |
| 403 | insufficient_scope | The token lacks openid or the account no longer has eligible access. Reconnect with the required identity permission and an eligible account. Read the WWW-Authenticate challenge for details. |
| 404 | invalid_request | OpenID Connect endpoints return HTTP 404 when identity integration is unavailable in this environment. Check discovery before relying on identity features. |
| 429 | temporarily_unavailable | The public OAuth request rate limit was reached. Wait for the current window before retrying. |
| 500 | server_error | Authorization is temporarily unavailable. Retry later. |
Was this page helpful?

