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

rorocodeath · March 06, 2014 · Last by rorocodeath replied at March 07, 2014 · 5216 hits

参考文档:http://open.youku.com/docs/upload_client_chinese.html 测试用账号:[email protected] 测试用密码: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

Postman 去测试吧。

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

rorocodeath in 大家用过优酷的上传视频 api 吗 mention this topic. 03 Apr 10:57
You need to Sign in before reply, if you don't have an account, please Sign up first.