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

# ベーシック認証

<div id="basic-authentication">
  ## Basic authentication
</div>

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

Basic Authentication を使ってリクエストを構築する場合、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"
```

**Basic 認証を必要とする API：**

* [PowerTrack API](/ja/x-api/enterprise-gnip-2.0/powertrack-api) エンタープライズ
* [Decahose stream API](http://localhost:3000/x-api/enterprise-gnip-2.0/fundamentals/decahose-api) エンタープライズ
* [30-Day Search API](/ja/x-api/enterprise-gnip-2.0/fundamentals/search-api) エンタープライズ
* [Full-Archive Search API](/ja/x-api/enterprise-gnip-2.0/fundamentals/search-api) エンタープライズ
* [Usage API](/ja/x-api/enterprise-gnip-2.0/fundamentals/usage) エンタープライズ
