Created
August 30, 2016 12:56
-
-
Save jhoerr/f875f3738f9a85e928b07cbb8e7b1168 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boxsdk import JWTAuth | |
from boxsdk import Client | |
# automation id => 32828.... What to do with this? | |
auth = JWTAuth( | |
client_id='8grfp2...', | |
client_secret='1FwTmL...', | |
enterprise_id='322105', | |
jwt_key_id='qasd...', | |
rsa_private_key_file_sys_path='c:\\temp\\private_key_nopass.pem' | |
) | |
# create user representing me and fetch an access token for it | |
client = Client(auth) | |
me = client.user(user_id='238631333') # [email protected], in the 'iudev' instance | |
token = auth.authenticate_app_user(me) | |
# ^^^ at this point the script throws an HTTP 400 with the message, | |
# “Cannot obtain user token based on the enterprise configuration of your app.” | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment