Welcome to the new Box Support website. Check out all the details here on what’s changed.

Error while using JWT Oauth with Python

New post

Comments

2 comments

  • mwiller

     Could you check the format of your private key file?  There is a very specific format it needs to be in for the parser to correctly read it, and errors often stem from it being subtly different than what the underlying JWT library can handle.

     

    For example, a valid private key that I can confirm works looks like this:

    -----BEGIN RSA PRIVATE KEY-----
    Proc-Type: 4,ENCRYPTED
    DEK-Info: AES-256-CBC,7629999DB4ECE43F49EAB01DA136CFE8
    
    <<< BASE64 ENCODED DATA GOES HERE >>>
    -----END RSA PRIVATE KEY-----

    The beginning and ending lines — as well as the line breaks — are required.

    0
    Comment actions Permalink
  • dkadia

    Thanks for the reply. I have downloaded the .JSON file for public/private key pair from box developer console gave the path to it in my code as shown above. What wrong can go with it. I haven't changed anything in the file.

    0
    Comment actions Permalink

Please sign in to leave a comment.