Retrieve the authenticated account
const url = 'https://api.talki.it/v1/account';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.talki.it/v1/account \ --header 'Authorization: Bearer <token>'Validate an API key and return the Talki account it belongs to. Requires account:read. Limited to 60 requests per minute per credential.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Successful Response
The authenticated account.
GET /v1/account doubles as the credential-validation endpoint: it is the
first call a partner makes after a customer pastes a key, so it must be
cheap, must require only account:read, and must expose nothing a
connection check does not need.
object
Example
{ "id": "f7e39b9a-1ac8-45e4-93da-2600f17cb286", "business_name": "Studio Bellini", "timezone": "Europe/Rome", "livemode": true}Headers
Section titled “Headers”Identifier to include when contacting Talki support.
The credential is missing, malformed, expired, revoked, or unknown.
object
object
Example
{ "error": { "type": "authentication_error", "code": "invalid_credentials", "message": "The supplied API credential is invalid.", "request_id": "req_7f24a2f8c6b64e699901563a458b5031" }}Headers
Section titled “Headers”Example
req_7f24a2f8c6b64e699901563a458b5031Identifier to include when contacting Talki support.
The account or credential may not perform this request.
object
object
Example
{ "error": { "type": "permission_error", "code": "insufficient_scope", "message": "This credential does not have the required scope.", "request_id": "req_7f24a2f8c6b64e699901563a458b5031" }}Headers
Section titled “Headers”Example
req_7f24a2f8c6b64e699901563a458b5031Identifier to include when contacting Talki support.
The credential exceeded its request rate.
object
object
Example
{ "error": { "type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Too many requests. Retry after the interval in Retry-After.", "request_id": "req_7f24a2f8c6b64e699901563a458b5031" }}Headers
Section titled “Headers”Example
req_7f24a2f8c6b64e699901563a458b5031Identifier to include when contacting Talki support.
An unexpected error occurred.
object
object
Example
{ "error": { "type": "api_error", "code": "internal_error", "message": "An unexpected error occurred. Quote the request_id when reporting it.", "request_id": "req_7f24a2f8c6b64e699901563a458b5031" }}Headers
Section titled “Headers”Example
req_7f24a2f8c6b64e699901563a458b5031Identifier to include when contacting Talki support.
