Manage settings and OAuth2 clients with the JavaScript SDK
const settings = await client.settings.getUserSettings('trading');
await client.settings.updateUserSetting('trading', 'default_quantity', 100);
await client.settings.resetUserSettings('trading');
const clients = await client.oauthClients.getClients(); clients.forEach(c => { console.log(`${c.name}: ${c.clientId}`); });
const oauthClient = await client.oauthClients.createClient({ name: 'My Trading App', redirectUris: ['https://myapp.com/callback'] }); console.log(`Client ID: ${oauthClient.clientId}`); console.log(`Client Secret: ${oauthClient.clientSecret}`);
await client.oauthClients.updateClient(clientId, { name: 'Updated App Name' });
await client.oauthClients.deleteClient(clientId);
Was this page helpful?