Skip to main content
POST
/
auth
/
token
Create Token
curl --request POST \
  --url https://api.veryfront.com/auth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "grant_type": "client_credentials",
  "client_id": "<string>",
  "client_secret": "<string>",
  "email": "[email protected]",
  "password": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "project_slug": "<string>",
  "custom_domain": "<string>",
  "options": {
    "shared_user_id": "<string>",
    "expire": 123,
    "scopes": [
      "<string>"
    ]
  }
}
'
{
  "access_token": "<string>",
  "token_type": "Bearer",
  "user": {}
}

Authorizations

Authorization
string
header
required

Authentication via JWT token or API key. JWT: Get from Veryfront dashboard. API Key: Format "vf__" - create via /api-keys endpoint.

Body

application/json
grant_type
enum<string>
required

OAuth grant type

Available options:
client_credentials,
password
Example:

"client_credentials"

client_id
string

Client ID (required for client_credentials)

client_secret
string

Client secret (required for client_credentials)

email
string<email>

User email (required for password grant)

password
string

User password (required for password grant)

project_id
string<uuid>

Project ID (UUID) for scoped tokens

project_slug
string

Project slug for scoped tokens (alternative to project_id)

custom_domain
string

Custom domain to resolve project (alternative to project_id/project_slug)

options
object

Response

Token successfully generated

access_token
string
required

JWT access token

token_type
enum<string>
required

Token type

Available options:
Bearer
user
object
required

User information