> For the complete documentation index, see [llms.txt](https://docs.tpi.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tpi.dev/digirunner-open-source/most-common-use-cases/obtaining-api-keys-and-calling-apis.md).

# Obtaining API Keys and Calling APIs

### Obtaining API Keys <a href="#toc164347053" id="toc164347053"></a>

1. Go to **Application Forms** > **API Key**, and click on the **Details** icon ![](/files/naT0c8ClbD3fH9uvjjx1) of the client to apply.

![](/files/rYJUO6FIlu0iCQm5jTgp)

2. Enter the API Key list of that user and click **Apply** to enter the apply page.

![](/files/wBRov6AV5Cht66NV4R7J)

3. Fill in the required fields.

![](/files/szbOq7ZLrl64cJb65B30)

4. Enter the keyword to search in the **Select API** field, and select the API to apply.

![](/files/4d5RNw7D3wjdM0PYb1ug)

5. Click **Save** to complete the application of the API Key.

![](/files/qLbS630dGNuXo1wf6HGM)

6. Go to **Application Forms** > **Applications**, locate the API Key application form to sign-off in the list of application forms.
7. Click on the **Submit for Review** icon, after the confirmation window pops up, click **Confirm** to complete the submission for review.

![](/files/bNjsfUBqxzj3SSrnlfsj)

8. Click the **Pending order** tab to enter the pending order list, click on the **Sign-off** icon to enter the sign-off page, and click **Approve** to complete the first review.

![](/files/oC6seIkyylPAf9TmBiSm)

9. Click on the **Sign-off** icon to enter the sign-off page, and click  **Approve** to complete the second review to obtain the API Key.

![](/files/R6WgYA0Bktl49KBetGsd)

10. Go to **System Information** > **API Key Approval History** to view the API Key applied today.

![](/files/X7OqP9LXtPhvD9XNJmQq)

### Calling APIs with the API Key <a href="#toc164347054" id="toc164347054"></a>

APIs registered in the system can use different OAuth Grant Type for verification, including: Client Credentials, Password, Basic, Auth and DGRK.

1. In the **Authorization** field, select **DGRK**.
2. In the **API Key** field, fill in the public key obtained from the email or database.
3. In the **Secret Key** field, fill in the private key obtained from the email or database.
4. Click **Test** to view the response. In this example, the status code is *200*, indicating that the body contains the data defined by the API.

![](/files/CKLaCkS4Xeoi8iQslMqT)


---

# 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://docs.tpi.dev/digirunner-open-source/most-common-use-cases/obtaining-api-keys-and-calling-apis.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.
