Strange behavior of /connection/xxx.json endpoint

Hello everyone.
Case #1:
I'm trying connect Facebook on mobile device. On permitions confirmation page I press "back" arrow, as on the screenshot. image
OneAll call my endpoint. In the endpoint I call https://truststamp-local.api.oneall.com/connection/a7b3e76a-7892-4309-9af1-32913c87f3f5.json and receive the answer:
{ "response": { "request": { "date": "Wed, 25 May 2016 18:42:38 +0200", "resource": "/connection/a7b3e76a-7892-4309-9af1-32913c87f3f5.json", "status": { "flag": "success", "code": 200, "info": "Your request has been processed successfully" } }, "result": { "status": { "flag": "error", "code": 401, "info": "The user did not authenticate successfully" }, "data": { "action": "authenticate_user", "plugin": { "key": "social_login", "data": { "action": "login", "operation": "nothing_to_do", "reason": "user_cancelled", "status": "error" } }, "connection": { "connection_token": "a7b3e76a-7892-4309-9af1-32913c87f3f5", "date": "Wed, 25 May 2016 18:40:22 +0200" } } } } }


Case #2:
I connected Google and trying connect Facebook. Same thing - I press "back" arrow. And call https://truststamp-local.api.oneall.com/connection/0a6e7143-bddf-41f2-8a19-80b94482d9e6.json.
Now I get another answer:
{ "response": { "request": { "date": "Wed, 25 May 2016 18:45:35 +0200", "resource": "/connection/0a6e7143-bddf-41f2-8a19-80b94482d9e6.json", "status": { "flag": "error", "code": 400, "info": "Your request could not be processed due to an error" } }, "result": { "data": { "action": "associate_identity", "plugin": { "key": "social_link", "data": { "action": "link_identity", "operation": "nothing_to_do", "reason": "user_cancelled_operation", "status": "error" } }, "connection": { "connection_token": "0a6e7143-bddf-41f2-8a19-80b94482d9e6", "date": "Wed, 25 May 2016 18:45:09 +0200" } } } } }

Can anybody explain me what the difference? Why I get HTTP 200 in case #1 and HTTP 400 in case #2?

Best Answer

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    edited May 2016 Answer ✓
    Hi Alexander,

    you seem to be using two different services.

    In case #1 you are using Social Login:
    "plugin": { "key": "social_login", }

    And in case #2 Social Link:
    plugin": { "key": "social_link" }

Answers

  • OK. But why? I call one endpoint and get different types of response for one result: "user cancelled".

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.