For the complete documentation index, see llms.txt. This page is also available as Markdown.

Login

Token

post

OAuth2 token endpoint.

Args: request: The request object. response: The response object. auth_form_data: The OAuth 2.0 authentication form data.

Returns: An access token or a redirect response.

Raises: CredentialsNotValid: If the credentials are invalid. ValueError: If the grant type is invalid.

Body
grant_typestring · nullableOptional
usernamestring · nullableOptional
passwordstring · nullableOptional
client_idstring · nullableOptional
device_codestring · nullableOptional
Responses
200

Successful Response

application/json
or
post/api/v1/login
POST /api/v1/login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 97

"grant_type='text'&username='text'&password='text'&client_id='text'&device_code='text'"
{
  "access_token": "text",
  "token_type": "text",
  "expires_in": 1,
  "refresh_token": "text",
  "csrf_token": "text",
  "scope": "text",
  "device_id": "123e4567-e89b-12d3-a456-426614174000",
  "device_metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
ZenML Scarf

Last updated

Was this helpful?