Skip to content

Authentication

This page provides an overview of authentication in Enfonica's platform for application developers. There are multiple ways of authentication depending on whether you are choosing to use the Enfonica REST API or one of our client libraries.

Authentication with Client Libraries

This section explains how to authenticate as a service account which is a prerequisite to using the Enfonica Client Libraries. A service account is a special type of Enfonica account intended to represent a non-human user that needs to authenticate and be authorized to access data in Enfonica APIs.

Creating a service account and service account key

You can create a service account and service account key in the Enfonica Console.

Using the service account key

To use the service account key, define the environment variable ENFONICA_APPLICATION_CREDENTIALS to be the location of your service account key. For example:

export ENFONICA_APPLICATION_CREDENTIALS=/path/to/key.json

The client library you are using will use this environment variable by default to authenticate with Enfonica services.

Authentication with REST (Deprecated)

You may also authentication using a limited-lifetime bearer token in the Authorization header. For example:

Authorization: Bearer eydUaGlzIGlzbnQgYSByZWFsIHRva2VuJzonLi4ub3IgaXMgaXQ/J30=

Enfonica will provision a bearer token that will last for 2 years. Contact support for more information.