---
title: "Get authentication token"
method: POST
path: "/api/oauth/v1/token"
tags: ["Authentication"]
---

# Get authentication token

`POST /api/oauth/v1/token`

## Request

- Base URL: `http://demo.akeneo.com`
- URL: `http://demo.akeneo.com/api/oauth/v1/token`
- Auth: none declared. Required headers: `Content-type`, `Authorization`

This endpoint allows you to get an authentication token. No need to be authenticated to use this endpoint.

## Headers

- `Content-type` string, required
- `Authorization` string, required

## Request body

- object
  - `username` string, required: Your PIM username
  - `password` string, required: Your PIM password
  - `grant_type` string, required: Always equal to "password"

## Response `200`

Return an authentication token

- object
  - `access_token` string: Authentication token that should be given in every authenticated request to the API
  - `expires_in` integer: Validity of the token given in seconds, 3600s = 1h by default
  - `token_type` string: Token type, always equal to "bearer"
  - `scope` string: Unused, always equal to "null"
  - `refresh_token` string: Use this token when your access token has expired. See <a href="/documentation/authentication.html#refresh-an-expired-token">Refresh an expired token</a> section for more details.

## Other responses

- `400`: Bad request
- `415`: Unsupported Media type
- `422`: Unprocessable entity

---

[API](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api.md) - [All operations](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/revisions/d8bda9b93b59?raw)
