Fetch Channel token v1

Last updated:2022-5-21
Fetch Channel token v1

API Overview

Functional description

For use AppIDThe key is used to provide access to the key. APIFetch acquiredtokenDeveloper's business system is available. UMSSystem doing. tokenIke. UMSAccesstokenIt'll be avoided. tokenConflict issues.

If the enterprise's operating systems are already connected to Wi-Fi,Official Account/Mini-programBusiness, hope. UMS Use of Wi-FiOfficial Account/Mini-programDo not conflict with business systems. tokenWhen creating a channel, you can choose to use a sweep authorization.

Call Address

GET https://api.ums.jiguang.cn/v1/token?type={type}

Call Authentication

HTTP Header(head) Key/Value Yes:

Authorization: Basic base64_auth_string

of which base64_auth_string The generation algorithm is:base64(ChannelKey:MasterSecret) That's right. ChannelKey Add a colon and add MasterSecret Collapse string. Do it again. base64 Convert.

Request parameters

typeFor the type of access that needs to be obtained, access to the channel authorized by this channel is possible through channel recognition. tokenvalue. type Here's a description of the value.

wechatoa 微信公众号 wechatmp 微信小程序 dingtalkcc 钉钉 wechatwk 企业微信
          wechatoa    微信公众号    
wechatmp    微信小程序
dingtalkcc    钉钉    
wechatwk    企业微信

        
This code block is shown in the floating window

Return parameters

Parameters Type Options Annotations
code int Required Business Return Code, successful as 0
token String Required The tunnel. tokenValue
expires_in String Required Effective time, in seconds
message string Required Business returns details. success, when failure returns to the specific cause of failure

When successful:

{ "code":0, "token":"token", "expires_in":"7000"//有效时间, 单位: 秒 }
          { 
 "code":0,
 "token":"token",
 "expires_in":"7000"//有效时间, 单位: 秒
 }

        
This code block is shown in the floating window

description

{ "code":5000, "message":"错误信息" }
          { 
 "code":5000, 
 "message":"错误信息"
}

        
This code block is shown in the floating window
Was this document helpful?

Copyright 2011-2026, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 Shenzhen Hexun Huagu Information Technology Co., Ltd.

Open in Docs Center