> ## 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**

**accept** `string` *required*

Defines the expected response format. It must be set to `application/json`.

##### **Body**

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

**username** `string` *required*

The client ID provided by mobway for your application.

**password** `string` *required*

The client secret provided by mobway for your application. It must be kept confidential.

> [!WARNING]
>
> The client\_id and client\_secret are unique per company/application and must not be shared!

## Response

**token** `string`

The token to be used as the Authentication header in other routes.

**expiration** `number`

The token expiration time in seconds. By default, it is set to expire in 1 hour (3600 seconds).

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

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.