Skip to main content
GET
/
.well-known
/
oauth-authorization-server
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx();

const response = await client.wellKnown.retrieveAuthorizationServerMetadata();

console.log(response.authorization_endpoint);
from telnyx import Telnyx

client = Telnyx()
response = client.well_known.retrieve_authorization_server_metadata()
print(response.authorization_endpoint)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.WellKnown.GetAuthorizationServerMetadata(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.AuthorizationEndpoint)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.wellknown.WellKnownRetrieveAuthorizationServerMetadataParams;
import com.telnyx.sdk.models.wellknown.WellKnownRetrieveAuthorizationServerMetadataResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

WellKnownRetrieveAuthorizationServerMetadataResponse response = client.wellKnown().retrieveAuthorizationServerMetadata();
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

response = telnyx.well_known.retrieve_authorization_server_metadata

puts(response)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$response = $client->wellKnown->retrieveAuthorizationServerMetadata();

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx well-known retrieve-authorization-server-metadata \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/.well-known/oauth-authorization-server
{
  "issuer": "<string>",
  "token_endpoint": "<string>",
  "introspection_endpoint": "<string>",
  "jwks_uri": "<string>",
  "registration_endpoint": "<string>",
  "authorization_endpoint": "<string>",
  "grant_types_supported": [
    "<string>"
  ],
  "code_challenge_methods_supported": [
    "<string>"
  ],
  "response_types_supported": [
    "<string>"
  ],
  "token_endpoint_auth_methods_supported": [
    "<string>"
  ],
  "scopes_supported": [
    "admin"
  ]
}
{
"error": "<string>",
"error_description": "<string>"
}
{
"error": "<string>",
"error_description": "<string>"
}

Response

Authorization server metadata

issuer
string<uri>

Authorization server issuer URL

token_endpoint
string<uri>

Token endpoint URL

introspection_endpoint
string<uri>

Token introspection endpoint URL

jwks_uri
string<uri>

JWK Set endpoint URL

registration_endpoint
string<uri>

Dynamic client registration endpoint URL

authorization_endpoint
string<uri>

Authorization endpoint URL

grant_types_supported
string[]

Supported grant types

code_challenge_methods_supported
string[]

Supported PKCE code challenge methods

response_types_supported
string[]

Supported response types

token_endpoint_auth_methods_supported
string[]

Supported token endpoint authentication methods

scopes_supported
string[]

Supported OAuth scopes

Example:
["admin"]