IoTIoT

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Feb 24, 2022 GMT+08:00

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

  1. 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.
  2. 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

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel