Skip to content

Instantly share code, notes, and snippets.

@vbence86
Last active June 27, 2016 14:09
Show Gist options
  • Save vbence86/669ae0dc3415a96f0880a0dd09c08c1c to your computer and use it in GitHub Desktop.
Save vbence86/669ae0dc3415a96f0880a0dd09c08c1c to your computer and use it in GitHub Desktop.
Log user into a session

Fetch a session

Babel Endpoint
https://babel-api-0-elb-external.babeltest.photobox.com/v2/Community/Session
Headers
X-Babel-Client: boxtop
Content-Type: application/json
Body
{"h": {}}

Example response:

{
  "babel_item_type": "return",
  "server_id": "1011204212",
  "server_tag": "tag1bHWzv2f7VW1",
  "value": {
    "class": "Community.Session",
    "id": "1000024744",
    "props": {
      "basket_id": "0",
      "channel_id": "1002",
      "code": "d1fad18bda7e6fd28ec8a87b6d36dde3",
      "country_id": 1,
      "created": "2016-06-27 13:54:47",
      "currency_id": "1",
      "expiry": "2016-06-28 13:54:47",
      "id": "1000024744",
      "language": "en",
      "lastupdated": "2016-06-27 13:54:47",
      "logged_in": "0",
      "maturity_id": 1,
      "may_act": "rwd",
      "member_id": "1000024744",
      "meta": "inception_client_id,boxtop:bencevarga",
      "privileges": "",
      "user_ip": "0.0.0.0"
    }
  }
}

Log into this Session

Fetch the following datas from JSON followed your precieding request

  • id (Session Id)
  • code (Session Code)
Babel Endpoint
https://babel-api-0-elb-external.babeltest.photobox.com/v2/Community/Session/xxxxxxxxx/Login
Headers
X-Babel-Client: boxtop
X-Babel-Session: xxxxxxxxxxxxxxxxx
Content-Type: application/json
Body
{
  "email": "[email protected]",
  "password": "pbx123"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment