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

# Login

## Login Endpoint

> Authenticates a user by submitting an accessKey (email) and secretKey (password) to get a bearer token.

```json
{"openapi":"3.0.0","info":{"title":"Reconciliation API","version":"1.0.0"},"servers":[{"url":"https://merchants-api.onekeypayments.com/v1","description":"Production Server"},{"url":"https://merchants-api-stg.onekeypayments.com/v1","description":"Staging Server"}],"paths":{"/auth/login":{"post":{"summary":"Login Endpoint","description":"Authenticates a user by submitting an accessKey (email) and secretKey (password) to get a bearer token.","operationId":"loginUser","tags":["Authentication"],"requestBody":{"description":"User credentials for authentication","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accessKey":{"type":"string","description":"Configured API User email address"},"secretKey":{"type":"string","description":"Configured API User's password"}}}}}},"responses":{"200":{"description":"OK - Login success. A BEARER_TOKEN cookie is set in the response headers.","content":{"application/json":{"schema":{"type":"object","properties":{"idUser":{"type":"integer"},"username":{"type":"string"},"idMerchant":{"type":"integer"}}}}}},"403":{"description":"Forbidden - Failure: invalid location","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"description":{"type":"string"}}}}}}}}}}}
```


---

# 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:

```
GET https://apidocs.onekeypayments.com/api-reference/reconciliation-api/login.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.
