> For the complete documentation index, see [llms.txt](https://apidocs.survey2connect.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.survey2connect.com/master.md).

# Authorization

## Login

<mark style="color:green;">`POST`</mark> `https://{{env}}.survey2connect.com/v2/oauth/token`

Survey2connect provides simple and powerful access to your survey data using Survey2connect RESTful Web APIs. We support various integrations using RESTful APIs.\
\
For establishing any API connection, API consumer needs to initiate an Authentication request. The Authentication services checks for the credentials provided and then returns an auth token upon successful authentication. The API consumer then passes this token along with subsequent requests in order to obtain required data from Survey2connect solution.

#### Request Body

| Name     | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| email    | string | email id of a valid S2C account |
| password | string | password of the S2C account     |

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

```
{
    "data": {
         "access_token": <access token>,
         "token_type": "Bearer",
         "expires_in": 86400,
         "refresh_token": <refresh token>,
         "created_at": 1620129612332
    }
}
```

{% endtab %}

{% tab title="302 " %}

```
```

{% endtab %}

{% tab title="304 " %}

```
```

{% endtab %}

{% tab title="400 " %}

```
{
    "error": {
         "name": "Bad Request",
         "message": "Missing email"
    }
}
```

{% endtab %}

{% tab title="401 " %}

```
{
    "error": {
         "name": "Unauthorized",
         "message": "Invalid Credentials"
    }
}
```

{% endtab %}
{% endtabs %}
