# Login & Register

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/oauth/token" method="post" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

## register

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/register`

#### Request Body

| Name                                       | Type   | Description              |
| ------------------------------------------ | ------ | ------------------------ |
| email<mark style="color:red;">\*</mark>    | String | The user's email address |
| password<mark style="color:red;">\*</mark> | String | The user's password      |

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

```javascript
{
    "id": 13,
    "url": "http://localhost:8000/api/v3/users/13",
    "email": "test@ushahidi.com",
    "realname": null,
    "logins": 0,
    "failed_attempts": 0,
    "last_login": null,
    "last_attempt": null,
    "created": "2022-11-03T23:19:23+00:00",
    "updated": null,
    "role": "user",
    "language": null,
    "contacts": [],
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "read_full",
        "register"
    ],
    "gravatar": "276f7d2512f5e6e6f99b5e405b944581"
}
```

{% endtab %}
{% endtabs %}

## password reset

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/passwordreset`

#### Request Body

| Name                                    | Type   | Description                         |
| --------------------------------------- | ------ | ----------------------------------- |
| email<mark style="color:red;">\*</mark> | String | The user's registered email address |

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

{% endtab %}
{% endtabs %}

## confirm password reset

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/passwordreset/confirm`

#### Request Body

| Name                                       | Type   | Description                                              |
| ------------------------------------------ | ------ | -------------------------------------------------------- |
| token<mark style="color:red;">\*</mark>    | String | The password reset token the user received in their mail |
| password<mark style="color:red;">\*</mark> | String | The user's new password                                  |

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

{% endtab %}
{% endtabs %}
