SDK-Get an user access

Occasional Contributor

SDK-Get an user access

Hello everyone, I was wondering if someone can help me because I am trying to work with the SDK from an API’s box to make a connection and get information about a link that is published, for example get information of the last published date and the person who published the link. But to make this I have an application that is reading the following data:


But when I set up the express and SDK the app is running but when I try to log in into the application, I have the error that appears in the image that I uploaded. So, I hope that someone can help me to solve this problem.


Captura de Pantalla 2020-03-24 a la(s) 10.43.15.png

Box Employee

Re: SDK-Get an user access

Hi @carlostorres1,


I think the issue has to do with your private key. Did you download the config file directly from the application config section of the developer console, or are you rolling your own private key? A few things to make sure of visually:


  • Does your private key include the start line and end line?
  • There should be no extra spaces between each line.

If you have created your own private key or you have it embedded inside the config JSON file that you downloaded from Box, it'll look something like this (just with a longer key):


-----BEGIN ENCRYPTED PRIVATE KEY-----\n6rAITIbV7A\nJhdDLWG+1eruLRIZVNMSwNq0vHA/GVpeKPjRs3aNfhoWWS016oaEiwXpEx03vUOieVJgpja1sm99eCIaQ/mFKP8M\nxCbNODIYlUZeWPUpCWtx0IgONxMj9TtqAOvlyPZKUNtGXtFluI5d2s+26oPs+p2F\nAzY=\n-----END ENCRYPTED PRIVATE KEY-----\n


Occasional Contributor

Re: SDK-Get an user access

Hello good morning @jcleblanc  thank you so much for answering my question, I tried to generate the json as the API documentation says and I can generate the publickeyID but I have one more question and I hope that you can help me, the question is: How can I generate the privateKey and passphrase in the configuration section? If the only thing that the api generates me is the developer token, clientID and the publicKey. So I have the doubt of how can I get the privatekey and the passphrase? Or I just need to assign some value personally?.

I hope that you can help me and again thanks for answering my question.