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.
Use to create application tokens. Select a token using the grant_type parameter.
Bearer authentication
Executed successfully.
Bad request.
unexpected error
unexpected error
POST /api/v1/token HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"grantType": "app_token",
"appID": "text",
"appSecret": "text",
"code": "text",
"redirectUri": "text",
"refreshToken": "text",
"username": "text",
"password": "text",
"clientID": "text"
}{
"accessToken": "text",
"idToken": "text",
"refreshToken": "text",
"externalToken": "text"
}Exchanges an authorization code for an access token. The authorization code is retrieved from the authorization server.
Bearer authentication
The redirect uri to redirect to after the authorization server completes the authorization flow
The exchange code retrieved from the idp server
Executed successfully.
Bad request.
unexpected error
unexpected error
GET /v1/k8s/auth/token/exchange?redirect_uri=text&code=text HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"accessToken": "text",
"idToken": "text",
"refreshToken": "text",
"externalToken": "text"
}Refreshes an user tokens. The refresh token is retrieved from the authorization server.
Bearer authentication
The refresh token retrieved from the idp server
Executed successfully.
Bad request.
unexpected error
unexpected error
POST /v1/k8s/auth/oauth/tokens/refresh?refresh_token=text HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"accessToken": "text",
"idToken": "text",
"refreshToken": "text",
"externalToken": "text"
}Retrieve access token for an application. The application token is retrieved from the authorization server.
Bearer authentication
Executed successfully.
Bad request.
unexpected error
unexpected error
POST /v1/k8s/auth/oauth/apptoken HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"id": "text",
"name": "text",
"secret": "text"
}{
"access_token": "text",
"id_token": "text"
}Last updated