ChangelogEdit pageSTAFFOpen dashboard

Sandbox and Production

Your Sandbox and Production workspaces each have their own API address and their own tokens. The whole API works in the Sandbox straight away; in Production, Bubbl turns it on for your workspace.

Base URLs#

WorkspaceBase URLWhat works
Sandboxhttps://api.sandbox.bubbl.tech/platform/v1The whole API, as soon as you create a token
Productionhttps://api.bubbl.tech/platform/v1GET /me and the reports at once; everything else once Bubbl turns on the full API for your workspace

The two workspaces are separate, as they are in the dashboard: each has its own campaigns, locations, notifications and media, and its own tokens. The same location has a different id in each. If you sync locations into both, give them an external_id so you can match them up (see Importing locations with GeoJSON).

Build in the Sandbox#

Start every integration in the Sandbox. Every ability works there, and campaigns only reach your approved test devices, so you can try things without affecting your live app. The Sandbox has lower rate limits than Production, and the same workspace limits as in the dashboard (see Sandbox and Production).

Go live in Production#

In Production, a token with reports:read can read your reports straight away. Everything else (campaigns, notifications, media and locations) needs the full API, which Bubbl turns on for your workspace. To ask for it, contact customer services: open Configuration › Platform API in Production and click Contact us.

You can create Production tokens with any abilities before then. Until the full API is on, any request that needs an ability other than reports:read gets 403 with the code platform_api_not_enabled, whatever abilities the token has:

RESPONSE
{
  "error": {
    "code": "platform_api_not_enabled",
    "message": "The full Platform API isn't enabled for this workspace yet. Contact customer services to turn it on; reporting is available now."
  }
}

Once it's on, the same tokens work without any change. If it's ever turned off again, your tokens are kept, but only GET /me and the reports work until it's back on.

To check from code, call GET /me. It returns environment (sandbox or production) and platform_api_enabled, which is always true in the Sandbox.

Using the wrong address#

A Sandbox token only works on the Sandbox address, and a Production token only on the Production one. Sending one to the other address gets 403 with the code wrong_environment. The message says which address to use:

RESPONSE
{
  "error": {
    "code": "wrong_environment",
    "message": "This is a Sandbox token: use the Sandbox API address. https://api.sandbox.bubbl.tech/platform/v1"
  }
}

When you move an integration from the Sandbox to Production, change the base URL and the token, and swap any ids you've stored for the Production ones.

A workspace scheduled for deletion#

While a workspace is scheduled for deletion, its tokens are refused with 403 and the code workspace_paused.