> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-066e8699.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ベーシック認証

> HTTP ベーシック認証を使用して、メールとパスワードを HTTPS 経由で送信し、PowerTrack、Decahose、Search などの X エンタープライズ API にアクセスします。

## ベーシック認証

X のエンタープライズ API の多くは HTTP ベーシック認証の使用を必要とします。ベーシック認証を必要とする API へのリクエストを成功させるには、各リクエストの認証ヘッダーとして有効なメールアドレスとパスワードの組み合わせを渡す必要があります。メールとパスワードの組み合わせは、[エンタープライズ API コンソール](https://console.gnip.com/) へのアクセスに使用するものと同じであり、このコンソール内から編集できます。

ベーシック認証を使用してリクエストを構築する際は、HTTPS 経由でエンコードされた認証情報を含む Authentication: Basic HTTP ヘッダーを追加してください。

次の cURL リクエスト例では、リクエストを送信する前に `<email_address>` と `<password>` を認証情報に置き換えます:

```bash theme={null}
curl -v --compressed -u<email_address>:<password>
    "https://gnip-api.x.com/search/30day/accounts/<account-name>/prod/counts.json?query=from%3Axdevelopers"
```

**ベーシック認証を必要とする API:**

* [PowerTrack API](/x-api/enterprise-gnip-2.0/powertrack-api) enterprise
* [Decahose stream API](http://localhost:3000/x-api/enterprise-gnip-2.0/fundamentals/decahose-api) enterprise
* [30-Day Search API](/x-api/enterprise-gnip-2.0/fundamentals/search-api) enterprise
* [Full-Archive Search API](/x-api/enterprise-gnip-2.0/fundamentals/search-api) enterprise
* [Usage API](/x-api/enterprise-gnip-2.0/fundamentals/usage) enterprise
