Last Updated on : 2024-06-13 08:21:51download
A token is required to authenticate and authorize API calls. The cloud APIs comply with the OAuth 2.0 implicit authorization.
The simple mode applies to access to data created by or associated with a cloud project.
GET:/v1.0/token?grant_type=1
client_id
(the request header), secret
(used to sign the request), and grant_type
(fixed to 1
).client_id
and secret
, Sign Requests for Cloud Authorization for the signing algorithms, and Get a Token for the API reference.Data source | API permission |
---|---|
The PID associated with the cloud project | PID permission package |
The mobile app or WeChat mini program associated with the cloud project | Mobile app/WeChat Mini Program permission package |
The user associated with the cloud project | User permission package |
The code mode applies to access to user data.
GET:/v1.0/token?grant_type=2&code=cf2xxxxxxxxxxxxxxxxxxxxxxxxxx8fe
client_id
(the request header), secret
(used to sign the request), code
(user authorization code), and grant_type
(fixed to 2
).client_id
and secret
.
client_id
comes from app authorization, see Sign Requests for App Authorization for the signing algorithms.client_id
comes from cloud Authorization, see Sign Requests for Cloud Authorization for the signing algorithms.If you are using OAuth 2.0 authorization mode on terminal, client_id
must be created from App Authorization. This type of client_id
is more secure, and can avoid large-scale security issues caused by the leakage of client_id
and secret
on terminal.
Data source | API permission |
---|---|
User authorization via the webpage | User permission package |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback