短信H5鏈接通過urlscheme跳轉微信小程序


1.已經發布的小程序。(未發布不可獲取)

2.通過該小程序獲取access_token。(access_token獲取規則參照:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html

3.post請求接口 取得 openlink

 

 

POST /wxa/generatescheme?access_token=生成的access_token HTTP/1.1
Host: api.weixin.qq.com
Content-Type: application/json
Content-Length: 41

{"jump_wxa":{"path":"pages/index/index"}}

 

響應內容

{
    "errcode": 0,
    "errmsg": "ok",
    "openlink": "weixin://dl/business/?t=ABCDEFG"
}

具體參數參照:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-scheme/urlscheme.generate.html

4.編寫頁面跳轉openlink的鏈接,需要注意的是必須有點擊事件才能打開urlscheme.

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM