赋值问题

夜行 2019-3-16 1340

// appKey = Va5yQRHl********LT0vuXV4

// appSecret = 0rDSjzQ20XUj5i********PQSzr5pVw2

https://openapi.baidu.com/oauth/2.0/token?grant_type=client_credentials&client_id=Va5yQRHl********LT0vuXV4&client_secret=0rDSjzQ20XUj5i********PQSzr5pVw2

我想用变量赋值的方式在网址中添加变量,,上面的怎么添加啊?

我下面的添加方式请求都失败

https://openapi.baidu.com/oauth/2.0/token?grant_type=client_credentials&client_id=appKey&client_secret=appSecret


"https://openapi.baidu.com/oauth/2.0/token?grant_type=client_credentials"&"client_id="&appKey&"client_secret="&appSecret

试了几种都请求失败


最新回复 (3)
  • 哈哈秀 2019-3-16
    2
    具体参考:http://ai.baidu.com/docs#/Auth/top
    https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=你的&client_secret=你的&
    这是用浏览器打开,你把access_token提取出来就可以了
  • 夜行 2019-3-16
    3
    哈哈秀 具体参考:http://ai.baidu.com/docs#/Auth/top https://aip.baidubce.com/oauth/2.0/token?grant_type=client_ ...
    浏览器我会提取,,,这是遇到这样的,,想赋值的就不会了
  • 哈哈秀 2019-3-16
    4
    字符串赋值?
    dim appKey     = Va5yQRHl********LT0vuXV4
    dim appSecret = 0rDSjzQ20XUj5i********PQSzr5pVw2
    dim url             = "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" & appKey & "&client_secret=" & appSecret & "&"
    打开 url 就可以了
    hWeb = WebBrowser.Create("chrome",url,10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"sBrowserPath":"","bChromeUnsafe":false})
返回
发新帖