astronep
astronep

Reputation: 59

Where to find jwt_key_id for box python SDK

I am not able to find jwt_key_id. Can anybody guide me to the right direction ?

auth = JWTAuth(
    client_id='got it from app configuration page',
    client_secret='got it from app configuration page',
    enterprise_id='got it from app configuration page',
    jwt_key_id='????',
    rsa_private_key_file_sys_path='got it from app configuration page',
    rsa_private_key_passphrase="got it from app configuration page"
    #store_tokens=your_store_tokens_callback_method,
)

Thank you.

Upvotes: 5

Views: 1032

Answers (1)

Fan
Fan

Reputation: 420

The naming is bad, jwt_key_id actually refers to publicKeyID in the json files you downloaded when you generate a rsa private key from the web. Or you can check the Add and Manage Public Keys section, there is 8 chars length string in Public Key x ID: {here is you asked for} .

But actually , the python SDK has bug, not support using the json file you downloaded directly, you have to create a RSA key pair and add the public key content to config page, check this post on official site https://community.box.com/t5/Box-Developer-Forum/Authentication-Using-JWT-in-Python-quot-Nonetype-quot-issue/td-p/39561 , if you create key pair WITHOUT passphrase, don't forget to not pass rsa_private_key_passphrase to the JWTAuth()

Upvotes: 2

Related Questions