Search code examples
sessionquickblox

Quickblox trying to get a sesssion


I've been trying to create a session, even with curl it's giving me something weird (I wiped app id and auth key out in this post):

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

With this I'm getting back this HTML body:

<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>

The example is pretty much straight from the doc, except the time stamp part. The signature has Anything I'm doing wrong?


Solution

  • This CURL example works OK

    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
    

    just type it in terminal