curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"e6e603c251a569e70a2f27a8c71b5017e81e05d5"
}' \
https://api.quickblox.com/session.json
{
"session": {
"application_id": 76730,
"created_at": "2019-09-01T14:55:56Z",
"id": 1151827623,
"nonce": 7334,
"token": "c56f382b402fb482086db956064592d3cd012bba",
"ts": 1567349756,
"updated_at": "2019-09-01T14:55:56Z",
"user_id": 0,
"_id": "1151827623"
}
}
{
"errors": [
"Unauthorized"
]
}
{
"errors": {
"base": [
"Unexpected signature"
]
}
}
Create Session
Creates an application or user session.
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"e6e603c251a569e70a2f27a8c71b5017e81e05d5"
}' \
https://api.quickblox.com/session.json
{
"session": {
"application_id": 76730,
"created_at": "2019-09-01T14:55:56Z",
"id": 1151827623,
"nonce": 7334,
"token": "c56f382b402fb482086db956064592d3cd012bba",
"ts": 1567349756,
"updated_at": "2019-09-01T14:55:56Z",
"user_id": 0,
"_id": "1151827623"
}
}
{
"errors": [
"Unauthorized"
]
}
{
"errors": {
"base": [
"Unexpected signature"
]
}
}
Recipes
Create application session
Create application session
1. Set your Application ID
application_id from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730"
}' \
https://api.quickblox.com/session.json
2. Set your Authorization Key
auth_key from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
}' \
https://api.quickblox.com/session.json
3. Set a timestamp
timestamp value in the Unix Timestamp.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
}' \
https://api.quickblox.com/session.json
4. Set a nonce
nonce value which is a unique random number that can’t be sent twice.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
}' \
https://api.quickblox.com/session.json
5. Set a signature
signature value. Use this guide to learn how to generate a signature.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"e6e603c251a569e70a2f27a8c71b5017e81e05d5"
}' \
https://api.quickblox.com/session.json
6. As a result, the API returns a newly created application session.
Create user session
Create user session
1. Set your Application ID
application_id from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730"
}' \
https://api.quickblox.com/session.json
2. Set your Authorization Key
auth_key from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"gqneCwWtz8dqF4F",
}' \
https://api.quickblox.com/session.json
3. Set a timestamp
timestamp value in the Unix Timestamp.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349717",
}' \
https://api.quickblox.com/session.json
4. Set a nonce
nonce value which is a unique random number that can’t be sent twice.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7497",
}' \
https://api.quickblox.com/session.json
5. Set a signature
signature value. Use this guide to learn how to generate a signature.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"1924a2c84b96347d66b6b2c8489a3cf1d35a8d74",
}' \
https://api.quickblox.com/session.json
6. Set a login of the user
login value to identify a user on the server.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"1924a2c84b96347d66b6b2c8489a3cf1d35a8d74",
"user":{
"login":"Mike",
}
}' \
https://api.quickblox.com/session.json
7. Set a password of the user
password value to identify a user on the server.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"1924a2c84b96347d66b6b2c8489a3cf1d35a8d74",
"user":{
"login":"Mike",
"password":"!mike123"
}
}' \
https://api.quickblox.com/session.json
8. As a result, the API returns a newly created user session.
Create session with Firebase phone number
Create session with Firebase phone number
1. Set your Application ID
application_id from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"71116",
}' \
https://api.quickblox.com/session.json
2. Set your Authorization Key
auth_key from the Dashboard => YOUR_APP => Overview section.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"RTydVt3ktSV3mpK",
}' \
https://api.quickblox.com/session.json
3. Set a Firebase user ID token
firebase_phone[access_token].curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
}' \
https://api.quickblox.com/session.json
4. Set an ID of the Firebase project
firebase_phone[project_id].curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
"firebase_phone[project_id]:"33444545",
}' \
https://api.quickblox.com/session.json
5. Set a nonce
nonce value which is a unique random number that can’t be sent twice.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
"firebase_phone[project_id]:"33444545",
"nonce":"9823",
}' \
https://api.quickblox.com/session.json
6. Set a social network provider
provider param to set a social network provider.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
"firebase_phone[project_id]:"33444545",
"nonce":"9823",
"provider":"firebase_phone",
}' \
https://api.quickblox.com/session.json
7. Set a signature
signature value. Use this guide to learn how to generate a signature.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
"firebase_phone[project_id]:"33444545",
"nonce":"9823",
"provider":"firebase_phone",
"signature":"5277a30edf002d59318ecec2cf3ab17c4bbd3bee",
}' \
https://api.quickblox.com/session.json
8. Set a timestamp
timestamp value in the Unix Timestamp.curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"firebase_phone[access_token]":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3MTBiMDE3ZmQ5YjcxMWUwMDljNmMzNmIwNzNiOGE2N2NiNjgyMTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcXVldWUtZGVtby1jbGllbnQiLCJhdWQiOiJxdWV1ZS1kZW1vLWNsaWVudCIsImF1dGhfdGltZSI6MTYyNjQzMjg5OSwidXNlcl9pZCI6InFhZnNjMHpnOHNVSktvdFJkb1J1eUx1UXdiRjMiLCJzdWIiOiJxYWZzYzB6ZzhzVUpLb3RSZG9SdXlMdVF3YkYzIiwiaWF0IjoxNjI2NDMyOTAwLCJleHAiOjE2MjY0MzY1MDAsInBob25lX251bWJlciI6IiszODA5Mzc2MzcyNTMiLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7InBob25lIjpbIiszODA5Mzc2MzcyNTMiXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwaG9uZSJ9fQ.ORDJTSGTicsvAeJ-eUQcDvt5Jv-y1c3HteOlzLApTZZ2C-nJZOB4RFpvoviIQwH53PFANB5iXTHBw1a5XBKROeRYEyu8YLg6RsH0wt5f5_hzGsUisgeFleDrz9i3V7NqkITqz2ADcJrWzwF-YDj5TbzCTlHmgeciiuViVbLqyFSKfyYrvFjM7x1IvJYUNVD3XGIq33128eaqHRuWfiaW5PC9ZdvfdOF5UhNpBx330TfM1FV9gNBQxd3cmxCE-bD1kvHQWLk6z8XKTNWZag718_Gf7MVmhqk-bC_KtwQ7IGVMRjPgCdNbA8H1btIcofD2iUVtzTew4et7leR6ujCAcA",
"firebase_phone[project_id]:"33444545",
"nonce":"9823",
"provider":"firebase_phone",
"signature":"5277a30edf002d59318ecec2cf3ab17c4bbd3bee",
"timestamp":"1626433392"
}' \
https://api.quickblox.com/session.json
9. As a result, the API returns a newly created user session.
- Login and password.
user[login]anduser[password]. - Email and password.
user[email]anduser[password]. - Social.
provider=facebook,keys[token], andkeys[secret]. - Firebase phone number.
provider=firebase_phone,firebase_phone[project_id], andfirebase_phone[access_token]. - Custom identity provider.
user[login]anduser[password]. Learn more about custom identity provider authentication from our guide.
Body Parameters
Responses
200
200
401
401
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"application_id":"76730",
"auth_key":"7quWEh-k6TqghXe",
"timestamp":"1567349756",
"nonce":"7334",
"signature":"e6e603c251a569e70a2f27a8c71b5017e81e05d5"
}' \
https://api.quickblox.com/session.json
{
"session": {
"application_id": 76730,
"created_at": "2019-09-01T14:55:56Z",
"id": 1151827623,
"nonce": 7334,
"token": "c56f382b402fb482086db956064592d3cd012bba",
"ts": 1567349756,
"updated_at": "2019-09-01T14:55:56Z",
"user_id": 0,
"_id": "1151827623"
}
}
{
"errors": [
"Unauthorized"
]
}
{
"errors": {
"base": [
"Unexpected signature"
]
}
}
Was this page helpful?