POST
/
api
/
external
/
oauth
/
token
Get OAuth Token
curl --request POST \
  --url https://{env}.tartanhq.com/api/external/oauth/token \
  --header 'Content-Type: multipart/form-data' \
  --form username=johndoe@example.com \
  --form password=mysecretpassword \
  --form grant_type=password
{
  "access_token": "eyJhbGciOi...",
  "token_type": "bearer",
  "expires_in": 3600,
  "refresh_token": "eyJhbGciOi..."
}

Body

multipart/form-data
username
string
required
Example:

"johndoe@example.com"

password
string<password>
required
Example:

"mysecretpassword"

grant_type
enum<string>
required
Available options:
password
Example:

"password"

Response

OAuth token generated successfully

access_token
string
Example:

"eyJhbGciOi..."

token_type
string
Example:

"bearer"

expires_in
integer
Example:

3600

refresh_token
string
Example:

"eyJhbGciOi..."