Introduction
Quick start
Setup is straightforward. You'll follow the same process whether you're building from scratch or adding to an existing app.
Create a developer account
If you haven't already done so, 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 an app key
in the header.
const {success, message, data: session} = await fetch('https://api.backstack.com/app/session', {
headers: {
'Authorization' : 'your-app-key'
}
});
// 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 response data: session
in your codebase.
<head>
<title>{session.app.title}</title>
</head>
...