Marketing Cloud Engagement の REST API 実行時に、リクエストの内容に問題が見当たらないにもかかわらず、対象のリソースが存在しないかのような 400 エラーが返る場合があります。400 エラーは汎用的なエラーで、多くの場合はリクエストの内容に誤りがあることを示します。しかし、この事象ではリクエストの内容に誤りが見つからないため、原因に気づくまでに時間がかかりがちです。
次のすべてに当てはまる場合は、アクセストークン取得時に指定したビジネスユニット (BU) も確認してください:
POST /v2/token) は正常にレスポンスを返すmessageId など) が見つからないかのような 400 エラーが返るアクセストークン取得時に、操作対象のリソースが登録されているビジネスユニットの MID を account_id に指定してください。操作対象のリソースが別の BU に登録されている場合、リクエストの内容に誤りがなくても、リソースが存在しないかのような 400 エラーが返ることがあります。
次の手順で確認し、必要に応じて対処してください:
POST /v2/token) のリクエストボディにある account_id が、手順 1 の BU の MID と一致しているかを確認します。account_id に手順 1 の BU の MID を指定して、アクセストークンを取得し直します。手順 3 で account_id に指定する BU は、インストール済みパッケージで「連携の有効化」が Enabled になっている必要があります。Enabled でない場合、アクセストークン取得 API は invalid_client のエラー (HTTP 401) を返します。連携の状況は、インストール済みパッケージの [アクセス] タブで確認できます。
上記の確認で解消しない場合は、client_secret と access_token をマスクしたうえで、実際のリクエスト・レスポンスの全文とともにサポートへお問い合わせください。
005459645

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.