Skip to main content
POST
/
oauth
/
grants
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.oauth.grants({ allowed: true, consent_token: 'consent_token' });

console.log(response.redirect_uri);
{
  "redirect_uri": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
allowed
boolean
required

Whether the grant is allowed

Consent token

Response

Grant created successfully

redirect_uri
string<uri>
required

Redirect URI with authorization code or error