403 Curl命令禁止出错

时间:2017-03-10 16:18:37

标签: curl bing-api microsoft-cognitive

我正在运行此脚本:

function getuuid() { echo `cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 32 | head -n 1 |  perl -ne 'print join("-", /(.{8})(.{4})(.{4})(.{4})(.{12})/);'`; }
curl -v -X POST "https://speech.platform.bing.com/recognize?scenarios=smd&appid=......&locale=en-US&device.os=linux&version=3.0&format=js$

我收到了403错误...我不知道我在这里做错了什么

我使用的另一个脚本

export SPEECH_TOKEN=`curl "https://api.cognitive.microsoft.com/sts/v1.0/issueToken" -H "Ocp-Apim-Subscription-Key: ................" --data-ascii ""`
function getuuid() { echo `cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 32 | head -n 1 |  perl -ne 'print join("-", /(.{8})(.{4})(.{4})(.{4})(.{12})/);'`; }
curl -v "https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=en-US&device.os=your_device_os&version=3.0&format=j$

0 个答案:

没有答案