Skip to main content
POST
/
api
/
v1
/
auth
/
mcp
/
token
OAuth 2.0 Token Endpoint
curl --request POST \
  --url https://api.neus.network/api/v1/auth/mcp/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'code=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'client_id=<string>' \
  --data 'code_verifier=<string>' \
  --data 'resource=<string>' \
  --data 'refresh_token=<string>' \
  --data 'scope=<string>'
{
  "access_token": "<string>",
  "expires_in": 123,
  "scope": "<string>",
  "refresh_token": "<string>",
  "expires_at": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.neus.network/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/x-www-form-urlencoded

Token endpoint request body (application/x-www-form-urlencoded). Supports authorization_code and refresh_token grant types.

grant_type
enum<string>

OAuth 2.0 grant type.

Available options:
authorization_code,
refresh_token
code
string

Authorization code (required for authorization_code grant).

redirect_uri
string<uri>

Must exactly match the redirect_uri from the authorization request (required for authorization_code grant).

client_id
string

OAuth client identifier (required).

code_verifier
string

PKCE code verifier (required for authorization_code grant).

resource
string<uri>

Resource indicator. Must be https://mcp.neus.network/mcp.

refresh_token
string

Refresh token (required for refresh_token grant).

scope
string

Requested scope (space-separated). Must not exceed scope of the original authorization.

Response

Token response

Standard OAuth 2.0 token response. The access_token is a JWT with audience https://mcp.neus.network/mcp.

access_token
string
required

JWT access token with aud=https://mcp.neus.network/mcp.

token_type
enum<string>
required
Available options:
Bearer
expires_in
integer
required

Token lifetime in seconds.

scope
string
required

Granted scope (space-separated).

refresh_token
string

Opaque or JWT refresh token. Rotated on each use. Included when offline_access scope was granted.

expires_at
integer

Convenience: absolute expiration timestamp (Unix ms).