> For the complete documentation index, see [llms.txt](https://docs.mogoplus.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mogoplus.ai/mogoplus-open-banking/api-reference/authentication.md).

# Authentication

{% hint style="info" %}
The client certificate and key, which are required to invoke the Authentication API will be provided by MOGOPLUS team.
{% endhint %}

## How to Authenticate?

* Get the client certificate and key from MOGOPLUS team
* Request MOGOPLUS team to provide Basic Auth info (username and password)
* Form the request as mentioned below using the above details and send
* You should receive a Bearer token in response to the request

## Login

<mark style="color:green;">`POST/`</mark>`https://auth.auuat.mogoplus.com/api/v1/oauth2/token?grant_type=client_credentials`

Invoke the API over mTLS and fetch access token from MOGOPLUS to prove the authenticity of requests

**Headers**

| Name          | Value                                |
| ------------- | ------------------------------------ |
| Content-Type  | `application/json`                   |
| Authorization | `Basic Auth <username and password>` |

**Parameters**

| Name        | Value               |
| ----------- | ------------------- |
| grant\_type | client\_credentials |

**Response**

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

```json
{
    "access_token": "eyJraWQiOiI0ZDIyZTlhMy1hNTcyMKD85Nz3kco6EHxYfTk",
    "token_type": "Bearer",
    "expires_in": 35999
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "error_description": "OAuth 2.0 Parameter: grant_type",
    "error": "unsupported_grant_type",
    "error_uri": "https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "error": "invalid_client"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mogoplus.ai/mogoplus-open-banking/api-reference/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
