---
updatedAt: 2026-05-11T08:37:02.000Z
agentTools:
  projectIndex: https://salesautopilot.readme.io/llms.txt
---

# Get Access Token

This endpoint is used to authenticate users and retrieve a JWT (JSON Web Token) for subsequent API requests. The token is required for accessing protected resources within the SalesAutopilot API. It is recommended to use this endpoint for first-time authentication or whenever the token has expired.

# API key-based identification

[Article](https://support.salesautopilot.com/hc/hu/articles/360010505354-API-kulcsp%C3%A1rok-kezel%C3%A9se) to help you set up your API key.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "salesautopilot-api-v2-bearer-login",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.salesautopilot.com/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/access-token": {
      "post": {
        "summary": "Get Access Token",
        "description": "This endpoint is used to authenticate users and retrieve a JWT (JSON Web Token) for subsequent API requests. The token is required for accessing protected resources within the SalesAutopilot API. It is recommended to use this endpoint for first-time authentication or whenever the token has expired.",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "password"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "API username"
                  },
                  "password": {
                    "type": "string",
                    "description": "API password"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"token\": \"eyJ0eXAiOiJKV1QiLCJ.eyJpc3MiOiJzdy5tYXJrZXRpbmdzy.odQHyYIkeWXpzofoOZblSfVub_ZFo3YnQJ\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "example": "eyJ0eXAiOiJKV1QiLCJ.eyJpc3MiOiJzdy5tYXJrZXRpbmdzy.odQHyYIkeWXpzofoOZblSfVub_ZFo3YnQJ"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": 1003,\n  \"message\": \"Invalid credentials!\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 1003,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid credentials!"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```