# Authentication

You must make all API calls over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Calls that you make over plain HTTP will fail. API requests without authentication will also fail.

**Where to find API keys**

The ***client\_id\_key*** and ***client\_secret\_key*** are found in the settings page which is accessible from the navigation bar if you have a paid account.

**Public API requests**

Public facing API requests (i.e. called with client-side requests) should have client\_id\_key set in the request headers.

```
client_id_key: 'ae3a42a7-8803-4d49-944a-2dfba8111b5a'
```

**Private API requests**

Private facing API requests (i.e. called within server-side requests) should have client\_id\_key ***and*** client\_secret\_key set in the request headers.

You should never expose the ***client\_secret\_key*** in publicly accessible areas such as GitHub, client-side code, and so forth. You can recycle your keys if you feel you have inadvertently exposed the keys at anytime.

```
client_id_key: 'ae3a42a7-8803-4d49-944a-2dfba8111b5a'
client_secret_key: 'be3b42b7-8803-4d49-944b-2dfbb8111b5b'
```

**Recycling keys**

The client\_id\_key and client\_secret\_key can be recycled in the settings page which is accessible from the navigation bar if you have a paid account. Make sure you update any code that has reference to the old keys to reflect the new keys.


---

# 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://swallow-1.gitbook.io/swallow/developer-api/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.
