Authorization

Deskree has a Permissions feature that allows to define endpoint-level permissions for databases and integrations. Hence, based on the configuration, some of the requests require Authorization header with a valid user idToken or even deskree-admin header with Deskree Admin Token to proceed.

User Token

For the requests that require a user token, make sure you are passing a valid idToken from your sign-in or sign-up requests when creating a client.

Make sure that you save the token expiration and always refresh the token before the expiry to avoid 403 errors

Example

import createClient from '@deskree/deskree-js'
import axios from 'axios'

const options = {
  projectId: "YOUR_PROJECT_ID",
  axios: axios,
  userToken: "USER_IDTOKEN"
}

const client = createClient(options)

Requests Returning idToken

Admin Token

For the requests that require an Admin Token, make sure you are passing a valid token when creating a client.

DANGER: Always keep your Deskree Admin token secure as it is a very powerful token that may allow unwanted access to your data if compromised. If you believe that is the case, you can always refresh your token.

Example

import createClient from '@deskree/deskree-js'
import axios from 'axios'

const options = {
  projectId: "YOUR_PROJECT_ID",
  axios: axios,
  adminToken: "YOUR_DESKREE_ADMIN_TOKEN",
}

const client = createClient(options)

Requests Returning idToken

Useful Resources

Last updated

Copyright © 2023 Deskree Technologies Inc.