5

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.

astronep
  • 59
  • 1

1 Answers1

2

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()

Fan
  • 410
  • 5
  • 10