# Authentication

{% hint style="danger" %} <mark style="color:red;">**WARNING:**</mark>&#x20;

**You are viewing an outdated version of our documentation.** \
**For the latest and most accurate information, please visit** [**docs.socialdata.tools**](https://docs.socialdata.tools)**.**
{% endhint %}

Each request to SocialData API needs to contain your API key. All unauthenticated requests are rejected.&#x20;

## Obtaining Your API Key

To authenticate with the SocialData API, you will need to obtain an API key. This key must be included in the Authorization header of every HTTP request you make. Follow these steps to get your Bearer token:

1. **Sign Up**: Create an account on the SocialData platform.
2. **API Key**: After signing up, generate your API key in user dashboard. Keep this key confidential, as it is your private access to the API.

## Using Your API Key

Once you have your Bearer token, you can use it in the Authorization header with the keyword 'Bearer' followed by a space and then your token. Here's an example of what the Authorization header should look like:

```http
Authorization: Bearer YOUR_API_KEY
```

Here’s a sample cURL request to illustrate how to include the Authorization header in your API calls:

```bash
curl -X GET "https://api.socialdata.tools/twitter/statuses/show?id=1740192018918170738" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY"
```

## Important Notes

* **Security**: Do not expose your API Key publicly. Treat it as you would your password, as it grants access to your SocialData API service and budget.
* **Expiration**: API Keys do not have an expiration date. However you are free to generate a new API key at any moment in your user dashboard.


---

# 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://socialdata.gitbook.io/docs/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.
