Configuration
Database (default)
No configuration required. By default this is the storage used (default value:database).
External API
You need to set 2 environment variables:CONNECTION_CREDENTIALS_STORAGE_TYPEtoexternal_apiCONNECTION_CREDENTIALS_EXTERNAL_API_ENDPOINT_URLto the designated endpoint, using REST API for reading and saving connection credentials.
X-Membrane-Token header with your token.
Saving credentials
Endpoint URL will containconnectionId query parameter (added by Membrane), as connection identifier. Body payload will contain credentials to store.
connectionId parameter will be added to the URL.
Payload:
CONNECTION_IDis the ID of the connection you wish to store the credentials forYOUR_CREDENTIALSis any valid JSON value. Can be a string, object, whatever is used for credentials for given connection, e.g.:
201 Createdwhen save was successful- non
2xxwhen save was unsuccessful
Reading credentials
Endpoint URL will containconnectionId as a query parameter:
connectionId parameter will be added to the URL.
Expected responses:
200 OKwith body{ "credentials": "YOUR_CREDENTIALS" }404 NOT FOUNDwhen credentials were not found
CONNECTION_IDis the ID of the connection you wish to get the credentials forYOUR_CREDENTIALScontains previously stored credentials, e.g.: