# Generate Authorization Token

Use the `login` mutation to generate an access token in order to use the Telewellness Portal API.

## Required Arguments

|              |          |                              |
| ------------ | -------- | ---------------------------- |
| **Argument** | **Type** | **Description**              |
| `email`      | String!  | Telewellness Admin email.    |
| `password`   | String!  | Telewellness Admin password. |

## Available Fields

|               |          |                                                          |
| ------------- | -------- | -------------------------------------------------------- |
| **Field**     | **Type** | **Description**                                          |
| `success`     | Boolean  | **True** if thelogin is successful, Otherwise **False.** |
| `accessToken` | String   | This token will be used as Authorization header.         |

## Example

{% tabs %}
{% tab title="Request" %}

```graphql
mutation {login(
  input:{
    email: "suggestic.admin@suggestic.com"
    password: "adminpass"
  }
){
  success
  message
  accessToken
  refreshToken
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "login": {
      "success": true,
      "message": "User logged in",
      "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9eyJleHAiOjE3MTk4NDg3NDYsImlzcyI6InNnOnBvcnRhbCIsImlhdCI6MTcxOTI0Mzk0NiwidWlkIjoiNTA0MyIsImVtYWlsIjoia2V5c3BhbkBzdWdnZXN0aWMuY29tIiwidGhpcmRwYXJ0eSI6IjU0NjkiLCJyb2xlcyI6WyJBRE1JTiIsIkNPQUNIX0FETUlOIiwiQ09BQ0hfQUxMX01FTUJFUlMiXX0.BmXI4I58k-rdV7Flcc1PsLvDN-uKtz-nd53oCInuFYQ",
      "refreshToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9eyJleHAiOjE3MjA0NTM1NDYsImlzcyI6InNnOnBvcnRhbCIsImlhdCI6MTcxOTI0Mzk0NiwidWlkIjoiNTA0MyIsImVtYWlsIjoia2V5c3BhbkBzdWdnZXN0aWMuY29tIiwidGhpcmRwYXJ0eSI6IjU0NjkiLCJyb2xlcyI6WyJBRE1JTiIsIkNPQUNIX0FETUlOIiwiQ09BQ0hfQUxMX01FTUJFUlMiXX0.jy06oUFPX2yl7CWczQ8shb0TdUYK_J5OF4_c-AZTQLc"
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# 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.suggestic.com/telewellness-portal/api-reference/generate-authorization-token.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.
