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

# Authentication

The "Authentication" folder in the API collection serves as a centralized location for API requests and endpoints related to user authentication and authorization processes.

## Get Token

> Request to receive a token, which is necessary to work with other requests. The token is valid for 60 minutes.\
> \
> Variables in the structure include:\
> \
> \- {{tenantName}}: Your Organization (Tenant) name\
> &#x20;   \
> \- {{clientName}}: Your Client name

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Authentication","description":"The \"Authentication\" folder in the API collection serves as a centralized location for API requests and endpoints related to user authentication and authorization processes."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[],"paths":{"/{tenantName}/admin/api_clients/{clientName}":{"post":{"summary":"Get Token","tags":["Authentication"],"operationId":"Get_Token","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/ClientName"}],"responses":{"201":{"description":"Bearer token issued successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"Request to receive a token, which is necessary to work with other requests. The token is valid for 60 minutes.\n\nVariables in the structure include:\n\n- {{tenantName}}: Your Organization (Tenant) name\n    \n- {{clientName}}: Your Client name","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}}}}}}}}},"components":{"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"ClientName":{"name":"clientName","in":"path","required":true,"description":"API client name provisioned in the Admin portal","schema":{"type":"string"}}},"schemas":{"TokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"Bearer token. Valid for 60 minutes."}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}}}
```


---

# 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.welkinhealth.com/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.
