Cannot add public key to app

Highlighted
New Contributor

Cannot add public key to app

I am attempting to add a public key to an app - the page has this URL structure:

https://app.box.com/developers/services/edit/APP_ID/publickey/

 

I enter my public key in the textarea and press submit, and I keep seeing the same error:

"Malformed public key"

 

I am using Google Chrome and have disabled all my extensions. I have two-factor auth enabled on the box.com developer account, because the site said that it was necessary to add a public key to an app.

 

Thank you for your assistance.

 

 

4 REPLIES 4
Highlighted
Box Employee

Re: Cannot add public key to app

 

The image below shows the expected format for the public key.

 

public-key-format-box-api-documentaiton.png

 

Are you including the full header and footer: '-----BEGIN PUBLIC KEY-----' AND '-----END PUBLIC KEY-----' in your input?

Highlighted
New Contributor

Re: Cannot add public key to app

No, I was not including those headers. But when including them I still get the same error. I will try to find somewhere that explains exactly how to generate this public key..

 

Edit:

For anyone else who has the same issue, this stackoverflow answer worked for me:

http://stackoverflow.com/a/5246045

Highlighted
Occasional Contributor

Re: Cannot add public key to app

Box seems to now expect the key bit-length to be 2048, so adjust the number 1024 in this example to 2048

Highlighted
First-time Contributor

Re: Cannot add public key to app

Hello there!

I'm facing the same issue. I've tried with the StackOverflow link that she posted above but it didn't work for me.

I'm only getting a message: "Verification failed. The public key seems to be malformed". And I'm not getting any other feedback besides this one.

I've tried with the full header and footer and without it too for the RSA key.

How can I solve that?

I'm following this tutorial: https://developer.box.com/guides/applications/custom-apps/jwt-setup/
@chill-clientio @morrowtfpx @Murtza Any suggestion?