> 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"}}}}}}}}}}}
```
