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

# Setting up the API

## Environmental variables to use:

<pre><code><strong>Cognito client ID: 6k5i4pgbvftapjjfv5gu1rkaot
</strong>REST API base endpoint: https://backend.app.ynteq.com/api/rest
API documentaiton link: https://app.ynteq.com/api-docs
</code></pre>

## Getting your access token:

1. Generate the refresh token (with an access token)

```
POST https://cognito-idp.eu-central-1.amazonaws.com/
```

Binary JSON data to attach to the request:

```

{
"AuthFlow": "USER_PASSWORD_AUTH",
"ClientId": "cognito_client_id",
"AuthParameters": {
"USERNAME": "user_email",
"PASSWORD": "user_password"
}
}
```

You can use the access token from the response, and after it had expired, refresh it with the step below.

2. Refresh the access token if needed with the refresh token

```
POST https://cognito-idp.eu-central-1.amazonaws.com/
```

Binary JSON data to attach to the request:

```
{
"AuthFlow": "REFRESH_TOKEN_AUTH",
"ClientId": "cognito_client_id",
"AuthParameters": {
"REFRESH_TOKEN": "provided_refresh_token_from_steps_above"
}
}
```

3. Use the provided access token to access the API

**Notes:**\
• all requests will be attached to the logged in user\
• please see the expiration time for the access token

Making requests

For further information, please check the API documentation under the sections below. To authenticate your requests, use the access token generated from steps above, and include it inside the Authorization\
header like this: `Bearer your-access-token.`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ynteq.gitbook.io/ynteq-docs/api-docs/setting-up-the-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
