InterviewSolution
| 1. |
How Do I Handle Tokens That Have Expired? |
|
Answer» The two complimentary strategies that developers MAY consider when handling expired tokens are as follows:
Capture the response with the HTTP Status CODE of 401 Unauthorized and invoke logic that retries the appropriate Get Access Token method request, as follows:
In the future, AT&T may change the default values of the expiration parameters for the OAuth access token and refresh token. So it is strongly advised that you always check the expires_in parameter value that is returned with the response to the Get Access Token method call. The two complimentary strategies that developers may consider when handling expired tokens are as follows: Capture the response with the HTTP Status code of 401 Unauthorized and invoke logic that retries the appropriate Get Access Token method request, as follows: In the future, AT&T may change the default values of the expiration parameters for the OAuth access token and refresh token. So it is strongly advised that you always check the expires_in parameter value that is returned with the response to the Get Access Token method call. |
|