> For the complete documentation index, see [llms.txt](https://rimplenet.gitbook.io/rimplenet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rimplenet.gitbook.io/rimplenet/api-reference/authorization.md).

# Authorization

This endpoint allows you to send a request that returns a Json Web Token (JWT).

​

{% hint style="info" %}
**You must have the Authorization to use this API**
{% endhint %}

### Authorization <a href="#authorization" id="authorization"></a>

## Authorization

<mark style="color:green;">`POST`</mark> `https://example.com/wp-json/rimplenet/v1 /authorization`

{% tabs %}
{% tab title="200: OK Authorization successful " %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Authorization Successful",
    "data": {
        "iss": "localhost",
        "iat": 0000000000,
        "exp": 0000000000,
        "user": {
            "id": 1,
            "username": "john",
            "roles": [
                "administrator"
            ]
        }
    },
    "error": []
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To view request params, click on the arrow (>) at the right-hand side of the endpoint URL to expand or collapse
{% endhint %}

**Sample response**{

{% tabs %}
{% tab title="200 OK" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Authorization Successful",
    "data": {
        "iss": "localhost",
        "iat": 0000000000,
        "exp": 0000000000,
        "user": {
            "id": 1,
            "username": "john",
            "roles": [
                "administrator"
            ]
        }
    },
    "error": []
}
```

{% endtab %}

{% tab title="400 BAD REQUEST" %}

```php
    "status_code": 400,
    "status": "failed",
    "message": "Validation error",
    "data": [],
    "error": [
        "Invalid Credential"
    ]
}
```

{% endtab %}
{% endtabs %}
