> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobway.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# POST token

> Returns a JWT token with a 1-hour (3600-second) expiration, using OAuth2-based authentication with client_id and client_secret.

## Request

##### **Header**

<ParamField body="accept" type="string" required="true">
  Defines the expected response format. It must be set to `application/json`.
</ParamField>

##### **Body**

The request body must include the client's authentication credentials, following the OAuth2 standard:

<ParamField body="client_id" type="string" required="true">
  The client ID provided by mobway for your application.
</ParamField>

<ParamField body="client_secret" type="string" required="true">
  The client secret provided by mobway for your application. It must be kept confidential.
</ParamField>

<Warning>
  The client\_id and client\_secret are unique per company/application and must not be shared!
</Warning>

## Response

<ResponseField name="token" type="string">
  The token to be used as the Authentication header in other routes.
</ResponseField>

<ResponseField name="expiration" type="number">
  The token expiration time in seconds. By default, it is set to expire in 1 hour (3600 seconds).
</ResponseField>

<RequestExample>
  ```bash Request theme={null}
  curl --request POST \
    --url https://api.mobway.cloud/token \
    --header 'accept: application/json' \
    --data-urlencode 'client_id=<client-id>' \
    --data-urlencode 'client_secret=<client-secret>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
  	"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55IjoibW9id2F5IiwiZXhwaXJhdGlvbiI6IjIwMjMtMTAtMTdUMTg6Mzc6MTkuNzkwMDMyIn0.lqqJBTvzoO1JhK0z8KBH_lw1eZA65DnIvu4VaaVv7yI",
  	"expiration": 3600
  }
  ```
</ResponseExample>
