API - Connect (using POST)

You start by connecting to a Beebox project. Upon connection, you obtain a session token. This token is included with all subsequent calls.

This method will be released in November 2023. Until then, please continue to use: https://wordbee.atlassian.net/l/cp/6MLvT55E


URL

(POST) https://{server}/api/connect

PARAMETERS

The request BODY must be a JSON object with these parameters:

project

The identifier of the project to connect to. You can find this id in the project settings page:

Mandatory

login

You can create credentials individually per each project.

Go to the project "Settings", then select "Connectors & API" and create login/password. These credentials can access data in the specific project and basic API methods only. Typically, these credentials would are perfect for CMS (Content Management System) connectors.

Alternatively, you can use the administrator credentials. In that case, you need to follow special rules.

Mandatory, string

pwd

The password.

Mandatory, string

waitsecs

Optional number. Default is 10.

Indicates the timeout in seconds for this call. Purpose: Whenever the Beebox executes automated operations, it blocks login attempts. This parameter indicates how long the login method waits before it returns an error.

Optional, Integer

connector

Optional. Free text that identifies your connector. For example “Drupal by xy”. Keep it a short product name. This information will be logged and is visible by the Beebox admin.

Optional, string

version

Optional. Free text containing the version number of your connector. For example "1.1.0". This information will be logged and is visible by the Beebox admin.

Optional, string


RESULTS

The API returns a session token which you include with all subsequent API calls.

It is important to verify the HTTP status code. If authentication succeeds, the method returns HTTP code 200 (success). All other HTTP codes point to an error.

If the server is busy due to a running server operation, the method will wait for the number of seconds specified in the “waitsecs” parameter. If the server is still busy after this period, the method fails with an error id "BUSY". In that case please wait a few seconds and retry.


HTTP status codes

With every API call, you need to check the HTTP error code. 200 and 204 equal success. All other codes point to an error.


DISCONNECTING

Always invalidate your token when you no longer need it. Failing to do so may put on hold automatic operations.

See API - Disconnect.




Copyright Wordbee - Buzzin' Outside the Box since 2008