Quickblox试图获得一个会话

时间:2013-08-01 07:22:14

标签: session quickblox

我一直在尝试创建一个会话,即使卷曲它给了我一些奇怪的东西(我在这篇帖子中擦除了app id和auth key):

curl -X POST \
-H "Content-Type: application/json" \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-d '{"application_id": "XXX", "auth_key": "XXXXXXXXXXXXXX", "timestamp": $(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s"), "nonce": "1236221330", "signature": "b51f77e6a233db78a3785e3cf8b27aa4e151bd96"}' \
https://api.quickblox.com/session.json

有了这个,我将回到这个HTML主体:

<body>
  <!-- This file lives in public/500.html -->
  <div class="dialog">
    <h1>We're sorry, but something went wrong.</h1>
    <p>We've been notified about this issue and we'll take a look at it shortly.</p>
  </div>
</body>

除了时间戳部分之外,该示例与文档非常相似。签名有什么我做错了吗?

2 个答案:

答案 0 :(得分:2)

尝试此params格式

-d "application_id=140&auth_key=7quWEh-k6TqghXe&timestamp=1326964049&nonce=414546828&signature=e6e603c251a569e70a2f27a8c71b5017e81e05d5" 

不是json身体

答案 1 :(得分:0)

此CURL示例正常工作

curl -X POST -H "Content-Type: application/json" -H "QuickBlox-REST-API-Version: 0.1.0" 
-d '{"application_id":"1","auth_key":"gHT98dDU2zpkKej","nonce":"33432","timestamp":"1375384935","signature":"242f6407b4cd6f0b06d1bca67faac4b57eb21c26"}' http://api.quickblox.com/session.json

只需在终端中输入

即可