# Authentication

Credentials can be supplied within a Playbook with the following parameters:

* **username** (**subscription\_user** is a legacy alias)
* **password** (**subscription\_password** is a legacy alias)
* **token**

However, the module can also inherit the credentials from environment variables:

* `IONOS_USERNAME`
* `IONOS_PASSWORD`
* `IONOS_TOKEN`

Username and password can be substituted by the token. Usage of the token is not mandatory. For generating a token, see [this](https://docs.ionos.com/cli-ionosctl/subcommands/authentication/token-generate)

> ***NOTE:*** The API URL can be changed using the following parameter **api\_url** in playbooks or using the `IONOS_API_URL` environment variable.

Storing credentials in environment variables is useful if you plan to store your PlayBooks using version control.


---

# 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.ionos.com/ansible/usage/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.
