Can't get access token when Salesforce self signed certificate used with OAuth + JWT app

SOLVED
Go to solution
Highlighted
New Contributor

Can't get access token when Salesforce self signed certificate used with OAuth + JWT app

I am trying to get access token from box.com.

For this I created a custom app that uses OAuth and JWT. I have also created a self signed certificate in salesforce. This self signed certificate is used in getting the assertion which is later used as request body (to box.com). However, I am getting a "400 Bad Request" status message. 

 

In box.com there is an option to add and manage Public Keys. I am not sure on what, I should insert here. From salesforce, I just downloaded the self signed certificate(crt file) and copied its content and pasted in box.com Add and Manage public keys section. However, It did not work. The content start as

-----BEGIN CERTIFICATE-----
MIIG+DCCBOCgAwIBA...
.......
-----END CERTIFICATE-----

Any help on what i should add in the Manage Public Keys section if salesforce self signed certificate is used.

1 REPLY 1
Highlighted
Box Employee

Re: Can't get access token when Salesforce self signed certificate used with OAuth + JWT app

Hi @masran,

 

Let me see if I can provide some context on that functionality. When using a JWT application, the private / public keys that are created basically allow you to connect any identity system you want with Box. The keys are just our way of determining whether your service has permission to connect to Box APIs.

 

For that public key that Box is asking for, here's some guidance on how to generate it manually yourself, and how to use the pre-configured download option. That should provide a bit of context for this one.