I'm attempting to create a group chat dialog in quickblox entirely through the REST API. How to create a user, a session, login, and then create a chat dialog all from the REST API? I can only successfully do the first two.
The tutorial has examples: http://quickblox.com/developers/Authentication_and_Authorization#API_User_Sign_In
I am able to create a session and create a user, after that I can't do more. When I try to login a user, as the example above, using this from the tutorial with my token and user:
curl -X POST \
-H "Content-Type: application/json"\
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: bee57951d76c03ffdecaad65bba039f4ad413ed7" \
-d '{"login": "Laralara", "password": "12345678"}' \
http://api.quickblox.com/login.json
I get Error:
curl: (6) Could not resolve host: QuickBlox-REST-API-Version
{"errors":{"login":["(or email) cannot be blank"],"password":["cannot be blank"]}}
No matter what I put in the data "-d" I get the same response.
If I try to create a chat dialog directly like in the example using this: http://quickblox.com/developers/Chat#Create_dialog
curl -X POST \
-H "Content-Type: application/json"\
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: ffed2e8da05b7a858ddee861ff31a09886aef540" \
-d '{"type": 2, "name": "Chat Bob, Sam, Garry", "id": "17435", "occupants_ids": "5712780"}' \
http://api.quickblox.com/chat/Dialog.json
I get Error:
curl: (6) Could not resolve host: QuickBlox-REST-API-Version
{"errors":{"base":["Forbidden. Need user."]}}
Thanks.