验证应用程序并在flattr api v2中获取访问令牌

时间:2011-11-16 22:43:33

标签: flattr

按照以下说明操作时,我对我的应用验证并获取访问令牌感到困惑:http://developers.flattr.net/v2/

第1步,Authenticate工作正常。我找回了代码,我的应用程序列在我的设置/应用程序中,范围正确。

然后我尝试通过以下curl命令获取访问令牌:

curl -v --user MY_KEY:MY_SECRET -H "Content-Type: application/json"\
-X POST -d '{"grant_type": "authorization_code",\
"redirect_uri": "http://localhost/", "code": "MY_CODE"}'\
https://flattr.com/oauth/token

不幸的是我总是得到“invalid_request”

< HTTP/1.1 400 Bad Request
< Strict-Transport-Security: max-age=500
< Set-Cookie: PHPSESSID=d9972s9r5a7t4p0ch4chc4dqh2; path=/; domain=.flattr.com; HttpOnly
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store
< Pragma: no-cache
< Content-Type: application/json; charset=utf-8
< Content-Length: 291
< Connection: close
< Date: Wed, 16 Nov 2011 22:38:30 GMT
< Server: lighttpd
< 
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed."}

谢谢!

1 个答案:

答案 0 :(得分:0)

我在这个过程中发现了一个错误,现在它被粉碎了。如果再次尝试请求,应该顺利进行!