# 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 %}


---

# 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.ushahidi.com/v3-ushahidi-platform-rest-api-documentation/v3/login-and-register.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.
