Skip to main content
POST
/
me
/
oauth
/
auth-tokens
Create an auth token via OAuth.
curl --request POST \
  --url https://console.gmicloud.ai/api/v1/me/oauth/auth-tokens \
  --header 'Content-Type: application/json' \
  --data '{
  "provider": "google",
  "accessToken": "ya29.a0AfH6SMB..."
}'
{
"authToken": "eyJhbGciOiJIUzI1NiIsInR..."
}

Body

application/json

The request body for creating an auth token via OAuth.

provider
enum<string>
required

The authentication provider used for login.

  • "google": User logs in with Google OAuth.
  • "github": User logs in with Github OAuth.
  • "hugging_face": User logs in with Hugging Face OAuth.
Available options:
google,
github,
hugging_face
Example:

"google"

accessToken
string
required

OAuth access token (e.g., Google).

Example:

"ya29.a0AfH6SMB..."

Response

Successfully created an auth token for user via OAuth.

authToken
string
required

A temporary token issued after the initial login step. This token is used in the create session API to exchange for access and refresh tokens.

Example:

"eyJhbGciOiJIUzI1NiIsInR..."