Server-to-Server OAuthのトークン取得でinvalid_requestエラー

件名: Server-to-Server OAuthアプリのトークン取得で invalid_request エラー

お世話になっております。

Server-to-Server OAuthアプリを作成し、アクティベーションまで完了しましたが、
アクセストークンの取得リクエストが常に失敗します。

【症状】
POST https://zoom.us/oauth/token
に対して、公式ドキュメント通りのリクエスト(grant_type=account_credentials、
account_id、Basic認証ヘッダー)を送っていますが、以下のエラーが返ってきます。

{“reason”:“Bad Request”,“error”:“invalid_request”}

【確認済みのこと】

  • アプリは「有効化済み」状態です(サーバー間OAuthアプリ、アカウントレベル)
  • Account ID / Client ID / Client Secret は、アプリ認証情報ページに表示された値と
    一致していることを確認済みです(コピー&ペーストのミスなし)
  • Client Secretは「再生する」で作り直し、直後に試しても同じエラーが出ます
  • リクエストのgrant_typeは “account_credentials” にしています
  • grant_type・account_idをURLクエリに入れる方法、リクエストボディに入れる方法、
    両方試しましたが結果は同じです
  • 別々の実装(fetch、Node.jsのhttpsモジュール)でも同じ結果です

【アプリ情報】

  • アプリ名: クラウド録画 ZoomToYoutube
  • タイプ: サーバー間OAuth
  • Account ID: QCOyj1NvS8umdUyjMqluhw

アカウント側の設定に何か制限や不足がないか、ご確認いただけますでしょうか。
よろしくお願いいたします。

@Junette could you check if you are doing something similar to thise code? Let me know if you are using a specific programming language

app.get(‘/s2soauth’, (req, res) => {
res.status(200).json({
message: ‘Live S2S OAuth token requests are disabled on this public demo.’,
liveTokenRequestDisabled: true,
grantType: ‘account_credentials’,
tokenUrl: ‘https://zoom.us/oauth/token?grant_type=account_credentials&account_id={ACCOUNT_ID}’,
requestShape: {
method: ‘POST’,
headers: {
Authorization: ‘Basic base64({CLIENT_ID}:{CLIENT_SECRET})’,
‘Content-Type’: ‘application/x-www-form-urlencoded’,
},
},
expectedResponseFields: [
‘access_token’,
‘token_type’,
‘expires_in’,
‘scope’,
‘api_url’,
],
});
});