Getting Set Up
6

Although we have some very useful SDKs that can help you get on your feet, it's very important that all of your admin and user data is parsed and stored by a secure server.

This means, you will need solid knowledge of our Cloud API (GraphQL) to complete your secure integration.

Step 1: Getting Your Bearer Token

The first step is acquiring your bearer token. You can log into into your account via our API using the following query:

GraphQL
query Login($email: String!, $password: String!) {
 EnjinOauth(email: $email, password: $password) {
   id
   name
   accessTokens
 }
}

Step 2: Getting the Secret Key

First, you will need to caquire your secret key, which you can do by following this query:

GraphQL
query GetAppSecret($id: Int!) {
 EnjinApps(id: $id){
   secret
 }
}

Step 3: Getting the Access Token

SECURITY: MAKE SURE TO STORE THIS SERVERSIDE!

Once you have retrieved the app secret from the previous step, you will need the access token, which you can retrieve by following this query:

GraphQL
query RetrieveAppAccessToken($appId: Int!, $appSecret: String!) {
 AuthApp(id: $appId, secret: $appSecret) {
   accessToken
   expiresIn
 }
}
Previous
next
On This Page