Skip to main content

JWT token not generated

  • December 27, 2023
  • 3 replies
  • 185 views

Hi Team,

We are constantly getting below error when our automated jenkins jobs trying to upload files on box folder:
access_token = response.json()[‘access_token’]
KeyError: ‘access_token’

The same jobs are working fine on staging server with same configurations means files are being uploaded to box folders using the same app config on our staging server.

The issue we are facing is in production jenkins jobs, it was working fine till 24th dec but now continue to fails generating access token.

We are currently using JWT without SDK approach.

Looking forward for some help.

Thanks,
Shailendra J

3 replies

rbarbosa Box
  • Developer Advocate
  • 553 replies
  • December 27, 2023

Hi @shailendraj

Assuming you’re making a request to get an access token, and using the JWT in the authorization header, it seems you’re getting back an error.

What error is it? What message is coming back from the API?

Let us know.

Cheers


  • Author
  • New Participant
  • 1 reply
  • December 27, 2023

Hi @rbarbosa

We are getting below error:

access_token = response.json()[‘access_token’]
KeyError: ‘access_token’


rbarbosa Box
  • Developer Advocate
  • 553 replies
  • December 27, 2023

🙂

Please send the actual response.json() content

The error you’re gettin is because ‘access_token’ is not present on the response. but what is the actual response?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings