Periodically Refreshing a Token
Typical Scenario
An NA calls this API to periodically refresh the accessToken. The update interval is the value of expiresIn in the return value of the Authentication method to ensure that the accessToken does not expire. The accessToken is managed by the SDK. When calling other service APIs, the SDK can set the accessToken to null.
API Function
A new accessToken is automatically obtained before the existing accessToken expires.
Note
- After this API is called, the SDK starts a thread to automatically refresh the accessToken. The accessToken is managed only in the SDK. NAs do not need to concern the accessToken. When calling other service APIs, the SDK sets the value of accessToken to null. If the value of accessToken is not null, the value of accessToken is used.
- You can call the stopRefreshTokenTimer() method to stop a thread. After this method is called, the accessToken in a request to call another service API cannot be null. The accessToken is managed by NAs.
API Description
1 |
void startRefreshTokenTimer() throws NorthApiException
|
Class
Authentication
Parameter Description
The application ID and secret use the values of ClientInfo in the NorthApiClient class.
Return Value
void
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot