# Authentication

API users are provided with an API key and secret. Please contact us for prices.

Authentication is handled using HTTP Basic Authentication:

```
Authorisation: Basic xxxxxx
```

where 'xxxxx' is the result of base64 encoding the api key and secret.

Most programming languages will have a library to handle this. For example, in Python the [requests](http://docs.python-requests.org/en/master/) library can make an authenticated request by doing:

```python
requests.get('https://api2.redflagalert.net/v4/companies/', auth=('key', 'secret'))
```

If you have any problems with authentication in your chosen language, please contact us for assistance.


---

# 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://developer.redflagalert.net/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.
