# Sign In

## How to work?

create a sign authorization form (login form)

![](https://2592634121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT5HLPrqZhkeNGgJP37dC%2Fuploads%2FgJOnFsDBCn7YlXlAzL1U%2FScreen%20Shot%202022-06-11%20at%2021.53.12.png?alt=media\&token=67252a2e-c9ac-477c-a9ea-706f4fd2c502)

add an onclick event handler on the login button, where shall I declare the onClick event function which calls axios or accepts variable in this code

**Understanding Axios POST requests**

If you click the login button, you will get a response in your console with a `200` status code telling you the `POST` request was successful.

<mark style="color:green;">`POST`</mark> `https://us-central1-appgregator.cloudfunctions.net/api/education/edutama/frontend/academy/user-signin/`

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | wkFBUJNQV;C |

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

```javascript
{
    "status": true,
    "message": "Successfully logged in",
    "data": "682|F6VMtUF1nTDyJRHWPUlAy0gJJZoCIZHidlPRzwGV"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Body JSON" %}

```
{
    "name":"qantor.co.id",
    "platform_id":4,
    "connection_name":"entrepreneurs.id-02",
    "email": "sschouse@gmail.com",
    "password": "qwerty"
}
```

{% endtab %}
{% endtabs %}
