Gatana logoGatana Docs
RoutesMcp serversServerslugCredentialsToken

/mcp-servers/{serverSlug}/credentials/token

Get the usable token for a credential. For API key credentials, returns the API keys. For OAuth credentials, returns the access token, refreshing it first if possible and necessary. When credentialsId is omitted, resolves the effective credentials for the current user

GET
/mcp-servers/{serverSlug}/credentials/token
AuthorizationBearer <token>

In: header

Path Parameters

serverSlug*string
Length1 <= length

Query Parameters

credentialsId?string

ID of a specific credential to retrieve the token for. If omitted, the effective credentials for the current user are resolved automatically.

Response Body

application/json

curl -X GET "https://YOUR_ORG_ID.gatana.ai/api/v1/mcp-servers/string/credentials/token"
{
  "type": "oauth",
  "accessToken": "string",
  "expiresAt": 0,
  "apikeys": [
    [
      "string",
      "string"
    ]
  ]
}