Tokens

Use tokens to facilitate authentication to the Run:ai API. The API server must be configured to use the Run:ai identity service to validate authentication tokens.

Create an application token.

Use to create application tokens. Select a token using the grant_type parameter.

SecuritybearerAuth
Request
header Parameters
User-Agent
string
Request Body schema: application/json
grantType
any
Enum: "app_token" "client_credentials" "refresh_token" "exchange_token" "password"
appID
string
Deprecated
appSecret
string
Deprecated
code
string
redirectUri
string
refreshToken
string
username
string
password
string
clientID
string
clientSecret
string
Responses
200

Executed successfully.

400

Bad request.

500

unexpected error

503

unexpected error

post/api/v1/token
Request samples
application/json
{
  • "grantType": "app_token",
  • "appID": "string",
  • "appSecret": "string",
  • "code": "string",
  • "redirectUri": "string",
  • "refreshToken": "string",
  • "username": "string",
  • "password": "string",
  • "clientID": "string",
  • "clientSecret": "string"
}
Response samples
application/json
{
  • "accessToken": "string",
  • "idToken": "string",
  • "refreshToken": "string",
  • "externalToken": "string"
}

get application tokenDeprecated

Retrieve access token for an application. The application token is retrieved from the authorization server. This endpoint is deprecated. Use /api/v1/token with the grantType parameter set to app_token instead, with AppID and appSecret set accordingly to get an application token

SecuritybearerAuth
Request
Request Body schema: application/json
id
required
string
name
required
string
secret
required
string
Responses
200

Executed successfully.

400

Bad request.

500

unexpected error

503

unexpected error

post/v1/k8s/auth/oauth/apptoken
Request samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "secret": "string"
}
Response samples
application/json
{
  • "access_token": "string",
  • "id_token": "string"
}