import Telnyx from 'telnyx';
const client = new Telnyx();
const response = await client.oauth.register();
console.log(response.client_id);{
"client_id": "abc123def456",
"client_id_issued_at": 123,
"client_secret": "<string>",
"redirect_uris": [
"<string>"
],
"client_name": "<string>",
"grant_types": [
"<string>"
],
"response_types": [
"<string>"
],
"scope": "<string>",
"token_endpoint_auth_method": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>"
}Register a new OAuth client dynamically (RFC 7591)
import Telnyx from 'telnyx';
const client = new Telnyx();
const response = await client.oauth.register();
console.log(response.client_id);{
"client_id": "abc123def456",
"client_id_issued_at": 123,
"client_secret": "<string>",
"redirect_uris": [
"<string>"
],
"client_name": "<string>",
"grant_types": [
"<string>"
],
"response_types": [
"<string>"
],
"scope": "<string>",
"token_endpoint_auth_method": "<string>",
"logo_uri": "<string>",
"tos_uri": "<string>",
"policy_uri": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Array of redirection URI strings for use in redirect-based flows
["https://example.com/callback"]Human-readable string name of the client to be presented to the end-user
"My OAuth Application"
Array of OAuth 2.0 grant type strings that the client may use
authorization_code, client_credentials, refresh_token Array of the OAuth 2.0 response type strings that the client may use
Space-separated string of scope values that the client may use
"admin"
Authentication method for the token endpoint
none, client_secret_basic, client_secret_post URL of the client logo
URL of the client's terms of service
URL of the client's privacy policy
Client registered successfully
Unique client identifier
"abc123def456"
Unix timestamp of when the client ID was issued
Client secret (only for confidential clients)
Array of redirection URIs
Human-readable client name
Array of allowed grant types
Array of allowed response types
Space-separated scope values
Token endpoint authentication method
URL of the client logo
URL of the client's terms of service
URL of the client's privacy policy
Was this page helpful?