Introduction

Quick start

Setup is simple and straightforward. You'll follow the same process whether you're building from scratch or adding to an existing app.


Create a developer account

Create a developer account. The system will provide a starting environment that you can work with for quickly understanding the entire process. You can change everything later.

Request an app session

Make an API request using the starter app key in the header.

const response = await fetch('https://api.backstack.com/app/session', {
  headers: {
      'Authorization' : 'your-app-key'
  }
})
  .then((response) => {
      const {success, message, data: session} = response.json()
    // Handle the response...
  });

The response will be your first app session, ready for the user to log in.

Response headers:

HTTP/1.1 200 OK
...
X-Session-Status: auth
X-JWT: "eyJ0eXAi..."

Response body:

{
  "success": true,
  "message": "",
  "data": {
    "app": {
      "id": "app_1234567890",
      "title": "Foo app",
      ...
    },
    "account": {},
    "user": {},
    "access": {},
    ...
  }
}

Use the session data in your codebase.

<head>
    <title>{session.app.title}</title>
</head>
...

Previous
About