当前位置: 动力学知识库 > 问答 > 编程问答 >

box api - "Please check the 'iss' claim" error when sending JWT to the /token API operation

问题描述:

I'm getting this response when calling the /token operation with a JWT on the Box OAuth 2 API:

{

"error": "invalid_grant",

"error_description": "Please check the 'iss' claim."

}

I've checked and double-check the value of the iss claim in the JWT which is defined as this at https://box-content.readme.io/docs/app-auth:

iss = The API key of the service that created the JWT assertion.

No matter what I've tried I get this error.

This occurred after setting the App's API key for Custom Applications in the "business Settings" -> Apps configuration for my account.

Can anyone point me in the right direction?

网友答案:

I believe the Api Key is identical to the client_id. Find it at https://app.box.com/developers/services/edit/<your_id_here>. Are you using the correct key and id?

网友答案:

Thanks to srt32 I was able to use the utility at jwt.io to realise that I was calling JSON.stringyfy when I shouldn't have. it was adding double quotes around by string which caused them to be escaped with a backslash.

分享给朋友:
您可能感兴趣的文章:
随机阅读: