# Login USAPI

##### Link:

<table border="1" id="bkmrk-environment-link-pro" style="border-collapse: collapse; width: 100%; height: 59.5938px;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Environment**</td><td style="height: 29.7969px;">**Link**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">Production</td><td style="height: 29.7969px;">https://usapi.onindonesia.id</td></tr><tr><td>Demo</td><td>https://demousapi.onindonesia.id</td></tr></tbody></table>

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50.0618%;"></col><col style="width: 50.0618%;"></col></colgroup><tbody><tr><td>**Endpoint**</td><td>**Method**  
</td></tr><tr><td>/auth</td><td>POST</td></tr></tbody></table>

##### Body request

```json
{
    "username": "usernew1",
    "password": "abc123",
    "options": {
        "nativeApp": false
    }
}
```

<table border="1" id="bkmrk-properties-propertie" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 23.115%;"></col><col style="width: 13.7206%;"></col><col style="width: 12.2373%;"></col><col style="width: 50.9271%;"></col></colgroup><tbody><tr><td>**Properties**  
</td><td>**Data type**</td><td>**Required**</td><td>**Description**</td></tr><tr><td>username</td><td>string</td><td>yes</td><td> </td></tr><tr><td>password</td><td>string</td><td>yes</td><td>  
</td></tr><tr><td>options</td><td>object</td><td>  
</td><td>  
</td></tr><tr><td>nativeApp</td><td>boolean</td><td>yes</td><td>This value determines whether the payload is coming from Mobile Apps ONAPPS (nativeApp: true) or not.</td></tr></tbody></table>

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">OK (200)</p>

```json
{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2Vy"
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">Body request example</p>

```javascript
insert code here
```

</details>