Sign In Try it free

Creating an Environment


Prerequisites

This guide assumes you've already done the following:

Now that we have created an account, we can set up our first environment.

What is an Environment?

An Environment is a wrapper around a set of API credentials. It contains the keys for any providers with which your application will interact.

Each account can have many environments. These can be used for different appilcations, or even for different stages for the same application.

A common use case is to have 3 environments: Test/Development, Staging and Production.

The credentials for these are then added to your application's config for each stage, and in doing so avoids polluting your production environment while developing and testing.

Creating an Envionment

Once signed up and logged in, you will be presented with the 'Create Environment' screen.

Initial environment creation Initial environment creation

Later you can create a new environment by selecting 'Add New Environment...' from the dropdown at the top of the screen.

Subsequent environment creation Subsequent environment creation

The initial setup only requires the name of your environment. Provider configuration comes later.

Once you have given the environment a name, click 'Create Environment'.

Environment created The environment has been created

We are now presented with a warning. This details the availability of the private Key which grants full access to the environment.

This is not held on in our systems, and so should be stored in a secure location.

WARNING:
The private key does not exist anywhere on the Work API platform (neither accessible to the developer or Work-API staff) after navigating away from this screen.

If this key is lost, the developer will no longer be able to create new user accounts, issue new access tokens. Any applications connected to the environment would need to be updated to use a new Work-API environment.

If the key is lost or misplaced, it can not be recovered and a new environment will need to be created in order to manage your users.

The private key is used to sign requests which allow users to create accounts, reauthorize accounts, and peform various admin-level operations on the environment.

The corresponding public key is stored on our servers, and is available for download at any time should you wish to use it for validation.

So we now save this to our local machine, and create backups as necessary.

Configuring the Environment

Work API connects to the underlying APIs on behalf of the developer. In order to to this, credentials must be supplied.

In this example, we will create a Gmail integration. First click 'Providers' in the sidebar and you are presented with an empty table. Click 'Add Provider'.

New Provider form New Provider form

NOTE:
The 'Client ID' and 'Client Secret' are found in the 3rd party developer site. In the case of Gmail, they can be created in the Google Developer Console under Credentials > Oauth 2.0 Client IDs

After hitting 'Save', your users will then be able to start adding integrations to their accounts.

Provider list Provider list

First 50,000 requests are free every month