Error while calling token API Error: preview : Your app cannot use actor_token due to Box policy
Hi,
We are getting error (your app cannot use \"actor_token\" due to Box policy") while calling token API, Can you please help with this,
I have included the API details below,
payload = {
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
resource: "https://api.box.com/2.0/files/#{document_id}",
subject_token: access_token,
subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
scope: "item_preview",
actor_token: actor_token,
actor_token_type: "urn:ietf:params:oauth:token-type:id_token"
}
begin
url = "https://api.box.com/oauth2/token"
response = RestClient::Request.execute(method: :post, url: url, payload: payload)
res_obj = JSON.parse response.body
rescue RestClient::ExceptionWithResponse => e
puts e.response
end
I need to create an access token with actor token to upload and preview a file. When I was trying to request api using payload with actor token, it throws below error.
I created the app as Custom app (User Authentication (OAuth 2.0)) , when i need to use actor token the response of my api call is 400 Bad request and the error message is like below,
{"error":"invalid_request","error_description":"Your app cannot use \"actor_token\" due to Box policy"}
投稿コメントは受け付けていません。
コメント
0件のコメント