Cloud Manager APIが「Api Key is invalid」(403003)エラーを返す

✨ このコンテンツはAIが生成したもので、不正確である可能性があります。 生成AI用語

この記事では、Cloud Manager APIに登録されていない資格情報を使用してCloud Manager APIにアクセスする際に発生する「Api Key is invalid」(error_code 403003)エラーを解決する方法について説明します。

説明 description

環境

Adobe Experience Manager Cloud Manager API (すべてのバージョン)

症状

Cloud Manager APIを購読していないAdobe Developer Console プロジェクトから資格情報(クライアント ID / x-api-key)を使用してCloud Manager APIを呼び出すと、次のエラーが返されます。

{
  "title": "ErrInvalidAPIKey",
  "status": 403,
  "error_code": 403003,
  "message": "Api Key is invalid"
}

このエラーは、Cloud Manager API ドキュメントで説明されているように、パイプラインステータスの取得などのAPI呼び出しを行うと発生します。

原因

クライアント ID (x-api-key)は、Cloud Manager APIを購読していないプロジェクトに属しています。 Cloud Manager APIには、Cloud Manager API as a Serviceを明示的に含むプロジェクトのクライアント IDが必要です。

解決策 resolution

問題を解決するには、次の手順に従います。

  1. Adobe Developer Console(https://developer.adobe.com/console/)で、新しいプロジェクトを作成するか、同じIMS組織内で既存のプロジェクトを開きます。

  2. Cloud Manager APIをプロジェクトに追加します。

  3. 認証タイプとして「OAuth Server-to-Server」を選択します。

  4. プロンプトが表示されたら、適切なCloud Manager製品プロファイルを選択します。

  5. このCloud Manager プロジェクトのOAuth サーバー間の資格情報を使用します。

    – 「client_credentials」とCloud Manager API資格情報のクライアント ID / クライアント秘密鍵を使用して、IMSからトークンをリクエストします。

    – 次のヘッダーを使用してCloud Manager APIを呼び出します。

    • Authorization: Bearer <token>
    • x-api-key: <client-id>
    • x-gw-ims-org-id: <org-id>
  6. 詳細な手順については、次のドキュメントを参照してください。

    • [Cloud Manager API Authentication Guide] (https://developer.adobe.com/experience-cloud/cloud-manager/guides/getting-started/authentication/authentication)

    • [Cloud Manager API Reference] (https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/)

    • [Server-to-Server Authentication Implementation] (https://developer.adobe.com/developer-console/docs/guides/authentication/ServerToServerAuthentication/implementation/)

これらの手順を完了した後、Cloud Manager APIへのAPI呼び出しが403003 エラーなしで成功することを確認します。

recommendation-more-help
experience-cloud-kcs-help-kbarticles