Account
- Print
Account
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Account Module 0.8.1
Overview
A module for querying about the device account.
Usage
To use the Account module, you can import it into your project from the Firebolt SDK:
import { Account } from '@firebolt-js/sdk'
Methods
id
Get the platform back-office account identifier
To get the value, call the method with no parameters:
function id(): Promise<string>
Promise resolution:
Type | Description |
---|---|
string | the id |
Examples
Default Example
JavaScript:
import { Account } from '@firebolt-js/sdk'
Account.id()
.then(id => {
console.log(id)
})
Value of id
:
"123"
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "account.id",
"params": {}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "123"
}
uid
Gets a unique id for the current app & account
To get the value, call the method with no parameters:
function uid(): Promise<string>
Promise resolution:
Type | Description |
---|---|
string | a unique ID |
Examples
Getting the unique ID
JavaScript:
import { Account } from '@firebolt-js/sdk'
Account.uid()
.then(uniqueId => {
console.log(uniqueId)
})
Value of uniqueId
:
"ee6723b8-7ab3-462c-8d93-dbf61227998e"
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "account.uid",
"params": {}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "ee6723b8-7ab3-462c-8d93-dbf61227998e"
}
Was this article helpful?