# Authentication

## Authenticate and obtain access token

> Authenticate using your client credentials to obtain an access token. The token expires after 30 minutes and must be included in the Authorization header for all subsequent API requests. The access token will be returned in the Authorization header.

```json
{"openapi":"3.0.3","info":{"title":"PayScore API","version":"1.0.0"},"tags":[{"name":"Authentication"}],"servers":[{"url":"https://api.payscore.com","description":"Production server"},{"url":"https://staging.api.payscore.com","description":"Staging server"}],"security":[],"paths":{"/api/v1/tenants/auth":{"post":{"summary":"Authenticate and obtain access token","description":"Authenticate using your client credentials to obtain an access token. The token expires after 30 minutes and must be included in the Authorization header for all subsequent API requests. The access token will be returned in the Authorization header.","operationId":"authenticateTenant","tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["client_id","secret_key"],"properties":{"client_id":{"type":"string","description":"Your client ID provided by Payscore"},"secret_key":{"type":"string","description":"Your secret key provided by Payscore"}}}}}},"responses":{"200":{"description":"Authentication successful","headers":{"Authorization":{"description":"Bearer token for API authentication","schema":{"type":"string"},"required":true}}},"401":{"description":"Authentication failed - invalid client credentials"}}}}}}
```


---

# 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.payscore.com/api-reference/authentication.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.
