QuickBlox用户注册问题REST API [英] QuickBlox user sign up issue REST API
问题描述
我正在按照
http://quickblox.com/developers/Users
,所以首先我通过发布带有以下参数的curl来获得令牌:
I am following the procedure mentioned in http://quickblox.com/developers/Users so first I get the token by posting curl with this params:
Array
(
[application_id] => 24719
[auth_key] => PY8EEvrxtPg3sGs
[timestamp] => 1435915101
[nonce] => 1435915100
[signature] => f45bdb40e8cfcf7235502b38586479f83925c6ad
)
至 https://api.quickblox.com/session.json
并得到响应:
to https://api.quickblox.com/session.json and getting response :
stdClass Object
(
[session] => stdClass Object
(
[_id] => 55965365535c12a58c031d01
[application_id] => 24719
[created_at] => 2015-07-03T09:18:29Z
[device_id] => 0
[nonce] => 1435915100
[token] => b913e37d88a0cab296eec6f44643e282d107dd58
[ts] => 1435915101
[updated_at] => 2015-07-03T09:18:29Z
[user_id] => 0
[id] => 1004
)
)
但是,当我尝试创建一个具有以下参数的新用户帐户:
However, when I try to create a new user account with below params:
Array
(
[login] => prasun1010
[full_name] => prasun1010
[custom_data] => I am a boy
[password] => ssd_p@p_23_1_
[token] => b913e37d88a0cab296eec6f44643e282d107dd58
[Version] => 0.1.0
[website] => http://localhost/xxx/trunk/php/
)
至: http:// api .quickblox.com / users.json
正在响应:
stdClass Object
(
[code] =>
[message] => No data was provided
)
有人可以让我知道我在做什么错吗?还是应该怎么做才能完成它?
Can someone please let me know what wrong I am doing ? Or what should I do to get it done?
推荐答案
如文档,则您的注册参数应包装在用户实体中。因此,您的新用户参数应如下所示:
As mentioned in documentation, your sign up params should be wrapped into 'user' entity. So your new user params should look like:
Array
(
[user] => Array
(
[login] => prasun1010
[full_name] => prasun1010
[custom_data] => I am a boy
[password] => ssd_p@p_23_1_
[token] => b913e37d88a0cab296eec6f44643e282d107dd58
[Version] => 0.1.0
[website] => http://localhost/xxx/trunk/php/
)
)
这篇关于QuickBlox用户注册问题REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!