Skip to content

Instantly share code, notes, and snippets.

@imran-samed
Last active February 5, 2019 05:09
Show Gist options
  • Save imran-samed/88c86656a92f2b983f6bdb6b8ca7234b to your computer and use it in GitHub Desktop.
Save imran-samed/88c86656a92f2b983f6bdb6b8ca7234b to your computer and use it in GitHub Desktop.
I noticed on thing while signup is successful ~/account-seetings api is getting use,
but somehow this time ~/session.json is getting use and genrating unauthorised error
02-04 13:27:57.631 16796-16796/com.tamaaas D/Request build:: application_id=****&auth_key=5yDWTkOqXW2xDyP&nonce=810761163&timestamp=1549267077&user[login]=913693693693&user[password]=913693693693
02-04 13:27:57.632 16796-16796/com.tamaaas D/QBASDK: =========================================================
=== REQUEST ==== b7a4afcd-c956-4696-8059-cca643a59177 ===
REQUEST
POST https://api.quickblox.com/session.json
HEADERS
QuickBlox-REST-API-Version=0.1.1
QB-SDK=Android 3.9.0
QB-Token=9cc1cc679efe92beec43b2b5bcef210dc701241f
PARAMETERS
application_id=****
auth_key=5yDWTkOqXW2xDyP
nonce=810761163
timestamp=1549267077
user[login]=913693693693
user[password]=913693693693
signature=e8577c064a5f131d887bb1932189df15ecb39ab9
INLINE
POST https://api.quickblox.com/session.json?application_id=****&auth_key=5yDWTkOqXW2xDyP&nonce=810761163&timestamp=1549267077&user[login]=913693693693&user[password]=913693693693&signature=e8577c064a5f131d887bb1932189df15ecb39ab9
02-04 13:27:58.404 16796-16796/com.tamaaas D/my_user_id: 27
02-04 13:27:59.454 16796-16796/com.tamaaas D/QBASDK: *********************************************************
*** RESPONSE *** b7a4afcd-c956-4696-8059-cca643a59177 ***
STATUS : 401
HEADERS
X-Runtime=0.023575
Cache-Control=no-cache
QuickBlox-REST-API-Version=0.1.1
Set-Cookie=_mkra_ctxt=419bfe3291ddfeab249db8d9d9206b4f--401; path=/; max-age=5; HttpOnly; secure
WWW-Authenticate=OAuth realm=auth
QB-Token-ExpirationDate=2019-02-04 09:57:59 UTC
Status=401 Unauthorized
X-Request-Id=75a355cc-e1a6-4871-a260-4e86056a2edd
X-Android-Response-Source=NETWORK 401
Connection=Close
X-Android-Sent-Millis=1549267078451
Content-Type=application/json; charset=utf-8
Date=Mon, 04 Feb 2019 07:57:59 GMT
X-Content-Type-Options=nosniff
Server=nginx/1.8.1
Content-Length=27
Strict-Transport-Security=max-age=31536000
X-XSS-Protection=1; mode=block
X-Frame-Options=SAMEORIGIN
X-Android-Received-Millis=1549267079446
Access-Control-Allow-Origin=*
BODY
'{"errors":["Unauthorized"]}'
02-04 13:27:59.471 16796-16796/com.tamaaas D/Request build:: application_id=74783&auth_key=5yDWTkOqXW2xDyP&nonce=-11231235&timestamp=1549267079&user[login]=913693693693&user[password]=913693693693
02-04 13:27:59.472 16796-16796/com.tamaaas D/QBASDK: =========================================================
=== REQUEST ==== d6283713-869c-440a-ba91-9c0837958249 ===
REQUEST
POST https://api.quickblox.com/session.json
HEADERS
QuickBlox-REST-API-Version=0.1.1
QB-SDK=Android 3.9.0
QB-Token=9cc1cc679efe92beec43b2b5bcef210dc701241f
PARAMETERS
application_id=74783
auth_key=5yDWTkOqXW2xDyP
nonce=-11231235
timestamp=1549267079
user[login]=913693693693
user[password]=913693693693
signature=f86a5ffe18c871ad6fb41b8a60d822c4f4928587
INLINE
POST https://api.quickblox.com/session.json?application_id=74783&auth_key=5yDWTkOqXW2xDyP&nonce=-11231235&timestamp=1549267079&user[login]=913693693693&user[password]=913693693693&signature=f86a5ffe18c871ad6fb41b8a60d822c4f4928587
02-04 13:28:01.172 16796-16796/com.tamaaas D/QBASDK: *********************************************************
*** RESPONSE *** d6283713-869c-440a-ba91-9c0837958249 ***
STATUS : 401
HEADERS
X-Runtime=0.019800
Cache-Control=no-cache
QuickBlox-REST-API-Version=0.1.1
Set-Cookie=_mkra_ctxt=571eac9269fdd326698a14ef16f81262--401; path=/; max-age=5; HttpOnly; secure
WWW-Authenticate=OAuth realm=auth
QB-Token-ExpirationDate=2019-02-04 09:58:00 UTC
Status=401 Unauthorized
X-Request-Id=98827f6d-a423-443c-9f67-5ce550cc99bb
X-Android-Response-Source=NETWORK 401
Connection=Close
X-Android-Sent-Millis=1549267080241
Content-Type=application/json; charset=utf-8
Date=Mon, 04 Feb 2019 07:58:00 GMT
X-Content-Type-Options=nosniff
Server=nginx/1.8.1
Content-Length=27
Strict-Transport-Security=max-age=31536000
X-XSS-Protection=1; mode=block
X-Frame-Options=SAMEORIGIN
X-Android-Received-Millis=1549267081160
Access-Control-Allow-Origin=*
BODY
'{"errors":["Unauthorized"]}'
And in other device another log is different ( here SIGNUP is SUCCESSFULL)
here is log
2019-02-04 14:36:34.899 28319-28319/com.tamaaas D/QBASDK: =========================================================
=== REQUEST ==== 7bb4ccae-5a87-4212-ad48-3901d1405155 ===
REQUEST
GET https://api.quickblox.com/account_settings.json
HEADERS
QB-Account-Key=nnw2FSSU1mks8VWfKFvE
PARAMETERS
INLINE
GET https://api.quickblox.com/account_settings.json
2019-02-04 14:36:35.696 28319-28319/com.tamaaas D/my_user_id: 3
2019-02-04 14:36:37.449 28319-28319/com.tamaaas D/QBASDK: *********************************************************
*** RESPONSE *** 7bb4ccae-5a87-4212-ad48-3901d1405155 ***
STATUS : 200
HEADERS
Status=200 OK
Server=nginx/1.8.1
Access-Control-Allow-Origin=*
X-Request-Id=2cd718c1-a369-40c1-97f1-90f6e004b856
X-Content-Type-Options=nosniff
X-Runtime=0.005508
Connection=Close
X-Android-Received-Millis=1549271197339
Date=Mon, 04 Feb 2019 09:07:38 GMT
QuickBlox-REST-API-Version=0.1.1
X-Frame-Options=SAMEORIGIN
X-Android-Selected-Protocol=http/1.1
Strict-Transport-Security=max-age=31536000max-age=15768000;
Cache-Control=max-age=0, private, must-revalidate
ETag=W/"12b620a10f866885151843e6321c8f86"
X-Android-Response-Source=NETWORK 200
Set-Cookie=_mkra_ctxt=f65fb35ce36561e2dc75565dfa0ff3f6--200; path=/; max-age=5; HttpOnly; secure
X-Android-Sent-Millis=1549271196988
Content-Length=124
X-XSS-Protection=1; mode=block
Content-Type=application/json; charset=utf-8
BODY
'{"api_endpoint":"https://api.quickblox.com","chat_endpoint":"chat.quickblox.com","turnserver_endpoint":"turn.quickblox.com"}'
2019-02-04 14:36:37.482 28319-28319/com.tamaaas D/QBASDK: Retrieved custom endpoints. ApiEndpoint: https://api.quickblox.com, ChatEndpoint: chat.quickblox.com
2019-02-04 14:36:37.510 28319-28319/com.tamaaas D/QBASDK: =========================================================
=== REQUEST ==== ae289f30-790c-4d98-b8e0-cb91d7fd6309 ===
REQUEST
POST https://api.quickblox.com/login.json
HEADERS
QuickBlox-REST-API-Version=0.1.1
QB-SDK=Android 3.9.0
QB-Token=b1f1b0d597a9aa90723d83cac78fcbc4cd01241f
PARAMETERS
login=912582582582
password=912582582582
INLINE
POST https://api.quickblox.com/login.json?login=912582582582&password=912582582582
2019-02-04 14:36:38.995 28319-28319/com.tamaaas D/QBASDK: *********************************************************
*** RESPONSE *** ae289f30-790c-4d98-b8e0-cb91d7fd6309 ***
STATUS : 202
HEADERS
Status=202 Accepted
Server=nginx/1.8.1
Access-Control-Allow-Origin=*
X-Request-Id=756cdf68-435b-4bf9-bb42-b307fccea441
X-Content-Type-Options=nosniff
X-Runtime=0.041148
Connection=Close
X-Android-Received-Millis=1549271198919
Date=Mon, 04 Feb 2019 09:07:40 GMT
QuickBlox-REST-API-Version=0.1.1
X-Frame-Options=SAMEORIGIN
X-Android-Selected-Protocol=http/1.1
Strict-Transport-Security=max-age=31536000
Cache-Control=no-cache
X-Android-Response-Source=NETWORK 202
Set-Cookie=_mkra_ctxt=3ddccf8de968518e952bdc2e77ef09f5--202; path=/; max-age=5; HttpOnly; secure
X-Android-Sent-Millis=1549271198170
Content-Length=447
X-XSS-Protection=1; mode=block
QB-Token-ExpirationDate=2019-02-04 11:07:40 UTC
Content-Type=application/json; charset=utf-8
BODY
'{"user":{"id":78857694,"full_name":"258","email":null,"login":"912582582582","phone":"912582582582","website":null,
"created_at":"2019-02-01T13:49:30Z","updated_at":"2019-02-04T07:18:28Z","last_request_at":"2019-02-04T09:07:40Z",
"external_user_id":null,"facebook_id":null,"twitter_id":null,"blob_id":null,"custom_data":null,"age_over16":false,
"allow_statistics_analysis":false,"allow_sales_activities":false,"parents_contacts":"","user_tags":null}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment