Générer la clé d’écriture du canal 2022-07-26

Overview

This API call is used to generate a new write key for a channel or to reset the existing key. After calling this API, the previous write key will no longer be valid. Please note that this will cause your device to stop uploading data as the credentials will have changed.

API URL

https://api.ubibot.com/channels/CHANNEL_ID/api_keys?action=generate_write_key&parameters

Where CHANNEL_ID is the ID of the target channel and the parameters are as defined below.

HTTP Method

POST

URL Parameters

NameTypeRequiredDescription
account_key or token_idStringRequiredSpecify the account_key from the user account or token_id obtained after login.

Response

An HTTP code of 200 is responded for each successful data requests. The message body contains a JSON object containing the new write key for the specified channel.

Error: See the separate list of error codes for more details.

Examples

POST https://api.ubibot.com/channels/CHANNEL_ID/api_keys?action=generate_write_key&account_key=xxxxxx-xxxxxx-xxxxxx-xxxxx