Skip to main content
POST
/
oauth
/
register
JavaScript
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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
redirect_uris
string<uri>[]

Array of redirection URI strings for use in redirect-based flows

Example:
["https://example.com/callback"]
client_name
string

Human-readable string name of the client to be presented to the end-user

Example:

"My OAuth Application"

grant_types
enum<string>[]

Array of OAuth 2.0 grant type strings that the client may use

Available options:
authorization_code,
client_credentials,
refresh_token
response_types
string[]

Array of the OAuth 2.0 response type strings that the client may use

scope
string

Space-separated string of scope values that the client may use

Example:

"admin"

token_endpoint_auth_method
enum<string>
default:client_secret_basic

Authentication method for the token endpoint

Available options:
none,
client_secret_basic,
client_secret_post
logo_uri
string<uri>

URL of the client logo

tos_uri
string<uri>

URL of the client's terms of service

policy_uri
string<uri>

URL of the client's privacy policy

Response

Client registered successfully

client_id
string
required

Unique client identifier

Example:

"abc123def456"

client_id_issued_at
integer
required

Unix timestamp of when the client ID was issued

client_secret
string

Client secret (only for confidential clients)

redirect_uris
string<uri>[]

Array of redirection URIs

client_name
string

Human-readable client name

grant_types
string[]

Array of allowed grant types

response_types
string[]

Array of allowed response types

scope
string

Space-separated scope values

token_endpoint_auth_method
string

Token endpoint authentication method

logo_uri
string<uri>

URL of the client logo

tos_uri
string<uri>

URL of the client's terms of service

policy_uri
string<uri>

URL of the client's privacy policy