Skip to main content
Question

JWT認証でアクセストークンを取得し、BOX APIを呼び出そうとしているのですが、エラーが発生してしまうため、こちらの解決方法について教えていただきたいです。

  • May 27, 2025
  • 1 reply
  • 89 views

Forum|alt.badge.img

================================日本語================================

こちらの投稿をご覧いただきありがとうございます。

本質問内容について簡単に申し上げますと、JWT認証でアクセストークンを取得した後に
認証方法がJWTのボックスアプリケーション経由でBOX APIを呼び出そうとしているのですが、

Status Code BadRequest: {"error":"unauthorized_client","error_description":"The \"box_subject_type\" value is unauthorized for this client_id"}

というエラーが発生してしまうため、こちらの解決方法について教えていただきたいです。

 

質問の背景としまして、現在、OutSystemsというノーコードツールを使用してWebアプリケーションを開発しております。

その中で、アプリケーションからBOX APIを呼び出し、アプリケーションとBOX間でファイルのやり取りができるようにしたいと考えております。

アクセストークンの取得までは正常に行えるのですが、肝心のAPIの実行が上記のエラーが発生してしまい、正常に行うことができません。

以下、詳細を共有致します。


■BOXアプリケーション
●アプリタイプ
カスタムアプリケーション

●認証方法
サーバー認証(JWT使用)

●アプリアクセスレベル
アプリアクセスのみ

●アプリケーションスコープ:コンテンツ操作
BOXに格納されている全てのファイルとフォルダへの書き込み

●ユーザーアクセストークンを生成する
有効化


■OutSystemsアプリケーションの設定や詳細
●クライアントID、クライアントシークレット、アクセストークン取得URL
全て設定済

●Client authentification
Send client credentials in body

●アクセストークン取得タイミング
API呼び出し前に取得

 

以上となります。

上記の内容に関しましてご不明な点、不足している情報などございましたら、ご遠慮なくご指摘下さい。

ご教示いただけますと幸いです。

何卒よろしくお願いいたします。


================================English================================

-Title-
I am trying to obtain an access token using JWT authentication and call the BOX API.
However, an error occurs. Please tell me how to resolve this error.
-------


Thank you for looking at this post.

To briefly explain my question, after obtaining an access token with JWT authentication,

I am trying to call the BOX API via a Box application whose authentication method is JWT, but I get the error:

Status Code BadRequest: {"error":"unauthorized_client","error_description":"The \"box_subject_type\" value is unauthorized for this client_id"}

Please tell me how to resolve this error.


To explain why I asked the question, I am currently developing a web application using a tool called OutSystems.

I want to call the BOX API from the application and be able to upload and download files between the application and BOX.

I can successfully obtain the access token.

However, when I execute the API, the error written above occurs and I cannot execute it normally.

I will explain in detail.


■BOX application
●Application type
Custom application

●Authentication method
Server authentication (using JWT)

●Application access level
Application access only

●Application scope: Content manipulation
Write to all files and folders stored in BOX

●Generate user access token
Enable


■OutSystems application settings and details
●Client ID, client secret, access token acquisition URL
All set

●Client authentification
Send client credentials in body

●Access token acquisition timing
Acquire before calling API


That's all.

If you have any questions about this post or any information that is missing, please let me know.

I would appreciate it if you could let me know.

Thank you in advance.

1 reply

Forum|alt.badge.img

Thank you Rona.

I'll make sure to check out the ticket you created.

Thank you in advance for your help.