Tokens
Use tokens to facilitate authentication to the NVIDIA Run:ai API. The API server must be configured to use the NVIDIA Run:ai identity service to validate authentication tokens.
Create tokens using the grant_type parameter.
Bearer authentication
Executed successfully.
Token lifetime in seconds
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: 86
{
"grantType": "client_credentials",
"clientID": "clientID",
"clientSecret": "clientSecret"
}{
"accessToken": "text",
"idToken": "text",
"refreshToken": "text",
"expiresIn": 1
}Use this endpoint to obtain an access token. Compliant with standard OAuth2 protocol and supports the common OAuth2 grant types.
Bearer authentication
The OAuth2 grant type that determines how the token will be issued.
OAuth2 client identifier
OAuth2 client secret
Resource owner username (for password grant)
The password of the resource owner. Required only when using the password grant type.
The refresh token used to obtain a new access token. Required only when using the refresh_token grant type.
Authorization code issued by the authorization server. Used in the authorization_code grant to exchange the code for an access token.
The redirect URI used during the authorization request. Required for the authorization_code grant to validate the redirect destination.
Successfully issued token
The access token issued by the authorization server
The type of the token issued (typically "Bearer")
BearerThe lifetime in seconds of the access token
3600The refresh token, which can be used to obtain new access tokens
ID Token value associated with the authenticated session (OpenID Connect)
The scope of the access token
Invalid request
Client authentication failed
unexpected error
unexpected error
POST /api/v2/token HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 142
"grant_type='authorization_code'&code='authorization_code_value'&redirect_uri='https://example.com/callback'&client_id='my-client-id'"{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}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
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