@turnkey/sdk-browser
.
TURNKEY_API_KEY
. A Cloud Storage “key” is the index under which a value is stored in Telegram Cloud Storage. This can be changed when using the .create()
or .setSigningKey()
functions. An API key is stored within Cloud Storage as a JSON string of the following object:
.create()
and .setSigningKey()
functions take one of the following 4 sets of arguments:
TURNKEY_API_KEY
and set that as the signing key.getAPIKey()
and .setAPIKey()
functions operate in a similar manner taking an optional key
parameter that will be used to get
or set
the API key at that location if it is passed, or at the default location if it is not passed.
The following section will describe the usage of the helper functions provided for interfacing with Telegram Cloud Storage. These functions return null if there is no value when trying to retrieve an item from Cloud Storage.
new
and .create()
here. .create()
will do the work of getting/setting an API key in Cloud Storage whereas new
will not
.setSigningKey()
the key will not be used for signing.
TURNKEY_API_KEY
will be used. If an API key is omitted and a CloudStorage key is specified an API key at that location will be used. Refer to the argument-usage section for a full explanation. A stamper that was originally used to just view Cloud Storage values can later be used for signing by using the .setSigningKey()
function.