面包多Pay
搜索
K

获取用户 openid

微信 JSAPI 支付必须

请求URL

  • https://p.mbd.pub/openid

请求方式

  • GET

请求参数

参数名
必选
类型
说明
target_url
string
自动跳转地址,例如 https://example.com?pid=123
app_id
string
你的app_id
假如需要接收 openid 的 url 是:
http://www.example.com/abc?uid=32
则直接通过浏览器跳转该 url 即可:
https://p.mbd.pub/openid?app_id=1234567890&target_url=http://www.example.com/abc?uid=32
完成 openid 获取后,微信浏览器会自动跳转至:
http://www.example.com/abc?uid=32&openid=*************