新手问题 youku api 上传视频遇到问题

rorocodeath · 发布于 2014年03月06日 · 最后由 rorocodeath 回复于 2014年03月07日 · 3471 次阅读
96

参考文档:http://open.youku.com/docs/upload_client_chinese.html 测试用账号:mayuyudeath@gmail.com 测试用密码:akb48death 这是一个测试账号,哪位大牛可以登陆我的账号,告诉我一个curl的解决方法

# run bash in my pc
zxr@roroco ~/Dropbox/ruby-projects/ro_front_end $ curl -XPOST https://openapi.youku.com/v2/oauth2/token --data-urlencode client_id=d58483641069b453 --data-urlencode client_secret=d660f3b635fe430ec182c697d60bb864 --data-urlencode grant_type=password --data-urlencode username=mayuyudeath --data-urlencode password=akb48death --data-urlencode redirect_uri=http://localhost:3000/oauth2/callback

# return
{"error":{"code":130011205,"type":"OAuth2Exception","description":"The client is not authorized to request an authorization using this method"}}


# redirect_url is ok

zxr@roroco ~/Dropbox/ruby-projects/ro_front_end $ curl -I localhost:3000/oauth2/callback
HTTP/1.1 200 OK 
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Ua-Compatible: chrome=1
Content-Type: text/html; charset=utf-8
Etag: "68b3ae0e4385002a3aaab89f725c9cc9"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: aefe1baa-991f-4e35-91c4-20c123f261f4
X-Runtime: 0.496650
Server: WEBrick/1.3.1 (Ruby/2.0.0/2013-11-22)
Date: Thu, 06 Mar 2014 02:44:37 GMT
Content-Length: 0
Connection: Keep-Alive
Set-Cookie: _ro_front_end_session=VHdRWkwyVldEN3REMkhVMm1aQWFHT1RVOU1xTlNaOXJ4dHBRc1QxTGl6cXVEU2wvdDl2REhSTTdsVVNxdWo0SjJNbnVMRVU5M003UUtER2RBQm90YlpyTVFpdUErdVJCcHJCUFZIeXVBVHo4WFZveXFWcEF4K1A1cEJ6M1VYaVU5cGFXbXA0NVBTY3lzclNrL1cvK0hXQnZYUGZ3UHpFdlhtWWRnZDV4aitUUXhQckE1dlJoUGFnZWh5MjJTbXI4LS0vdEFRMVdBV0JtY05RWG1YNUVTdXBBPT0%3D--7d0a1ddf3651ddc79b1e51a3e3887942c3d2f11c; path=/; HttpOnly
共收到 2 条回复
273

Postman 去测试吧。

96

已经解决了,优酷技术人员这是合作伙伴授权内容,建议我使用通用授权

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册