Skip to content

Conversation

@zhangwg4apollo
Copy link
Contributor

This update modifies the AccessTokenResponse class to correctly parse the expires_in field from the token response payload.

Background

The API response returns the following structure:

{
  "access_token": "Atza|IwEBIA***",
  "refresh_token": "Atzr|IwEBIGk6***",
  "token_type": "bearer",
  "expires_in": 3600
}

However, the previous implementation attempted to retrieve the token expiration value using the incorrect key 'expires'.

Change Summary

  • ✅ Updated self.expires_in = kwargs.get('expires')
    ➡️ to self.expires_in = kwargs.get('expires_in')

This ensures correct parsing of the expires_in field and avoids potential issues with missing or incorrect token expiration handling.

@denisneuf
Copy link
Owner

Oh, let me check and I will merge

@denisneuf denisneuf merged commit 5d79835 into denisneuf:main May 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants