简体   繁体   中英

Huawei Push kit Change Token expiración Time

It's possible to change the expiration time response variable huawei (expires_in) when we obtain a new token for send push kit notification?, or what would be the best way to renew this token on my server

by default the variable (expires_in) is set in 3600 seconds i like to change this number to more time.

the documentation don't show nothing for change this variable, its only show:

Send a POST request. Example:

  1. POST /oauth2/v3/token HTTP/1.1

  2. Host: oauth-login.cloud.huawei.com

  3. Content-Type: application/x-www-form-urlencoded

  4. grant_type=client_credentials&client_id= <Client ID> &client_secret= <Client secret>

Response message:

  1. HTTP/1.1 200 OK

  2. Content-Type: application/json;charset=UTF-8

  3. Cache-Control: no-store

  4. {

  5. "access_token": "< Returned access token >",

  6. "expires_in": 3600,

  7. "token_type": "Bearer"

  8. }

response vars descriptions

change the expiration time response variable (expires_in)

Did you try this?:

  1. grant_type=client_credentials&t ime_out=4500 &client_id=&client_secret=

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM