import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const createAccountResponse = await client.accounts.create({ account_name: 'account_name' });
console.log(createAccountResponse.account_id);
{
"account_id": "<string>"
}
Create a new account that with yourself as the admin.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const createAccountResponse = await client.accounts.create({ account_name: 'account_name' });
console.log(createAccountResponse.account_id);
{
"account_id": "<string>"
}
Successful Response
The response is of type object
.