Skip to main content

Hi,

  • I am doing box integration with Salesforce. We are using JWT for authentication. While authentication we are getting invalid sub error. I am passing the enterpriseId in string format and also my app has permission for generating user token and perform action as user. What else could be reason for this error.

 


 


When the sub is your enterprise ID, then the box_sub_type needs to be enterprise.


 


sub: config.enterpriseID,
box_sub_type: "enterprise",

 


Similarly when trying to create a JWT for a user the sub is your user ID and the box_sub_type should be user.


 


Can you make sure that this is correct in your claim? You can see a full example over here.


 


https://developer.box.com/guides/authentication/jwt/without-sdk/



Reply