# Authentication

To access our services, you need to be both authenticated and authorized. The first step is to generate an access token. This token is essential for secure interaction with our API and ensures that only authorized users can access the services.

### Credentials for Token Generation

To create your access token, you will need the following credentials, which were provided to you via email:

* **Key:** A unique identifier for your application.&#x20;
* **Username:** Your assigned username.&#x20;
* **Password:** The corresponding password for your username.

### How to Authenticate

**Send Your Key as a Header:** Include your key in the request header under the field Authorization-Key.

**Use Basic Authorization for Username and Password:** Combine your username and password into a Basic Authorization header. This involves encoding the username:password pair using Base64.

<mark style="color:green;">POST</mark>   [Create JWT token](#business-v1-auth)

{% openapi src="/files/4oCk75nmswflQbV3VZRH" path="/business/v1/auth" method="post" %}
[swagger-business.json](https://2093545926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3zb7cV9cfl5Gboof9fgA%2Fuploads%2FHWyPy65zoM8khgjBWXf6%2Fswagger-business.json?alt=media\&token=e0976cfc-eb2b-41b2-886b-7bcea292c232)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-business.mio.id/api-reference/api-endpoints/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
