You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use https://github.com/box/box-python-sdk-gen?tab=readme-ov-file#installing to connect to box so that I can download and upload files. I have tried getting a Developer Token from the Configuration page and inserting into code. I then try to run the code but get this issue: Message: Developer token has expired. Please provide a new one.
Steps to Reproduce
pip install box-sdk-gen
copy code:
from box_sdk_gen import BoxClient, BoxDeveloperTokenAuth
def main(token: str):
auth: BoxDeveloperTokenAuth = BoxDeveloperTokenAuth(token=token)
client: BoxClient = BoxClient(auth=auth)
for item in client.folders.get_folder_items('0').entries:
print(item.name)
if name == 'main':
main('INSERT YOUR DEVELOPER TOKEN HERE')
I Insert my developer token from configuration page
I run script
gives me error
Expected Behavior
I expected it to be able to connect to my box
Error Message, Including Stack Trace
Screenshots
attached
Versions Used
Python: Python 3.11.8
The text was updated successfully, but these errors were encountered:
Developer tokens are usually short-lived. It is possible that yours has expired before the call was made. You can try making the same call with cURL to make sure it's not a problem with the SDK itself - https://developer.box.com/reference/get-folders-id/
curl -i -X GET "https://api.box.com/2.0/folders/0" \
-H "authorization: Bearer <ACCESS_TOKEN>"
If problem still persist I recommend reaching out to our forums
This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.
Description of the Issue
I am trying to use https://github.com/box/box-python-sdk-gen?tab=readme-ov-file#installing to connect to box so that I can download and upload files. I have tried getting a Developer Token from the Configuration page and inserting into code. I then try to run the code but get this issue: Message: Developer token has expired. Please provide a new one.
Steps to Reproduce
def main(token: str):
auth: BoxDeveloperTokenAuth = BoxDeveloperTokenAuth(token=token)
client: BoxClient = BoxClient(auth=auth)
for item in client.folders.get_folder_items('0').entries:
print(item.name)
if name == 'main':
main('INSERT YOUR DEVELOPER TOKEN HERE')
Expected Behavior
I expected it to be able to connect to my box
Error Message, Including Stack Trace
Screenshots
attached
Versions Used
Python: Python 3.11.8
The text was updated successfully, but these errors were encountered: