JavaScript
import { TrophyApiClient } from '@trophyso/node'; const trophy = new TrophyApiClient({ apiKey: 'YOUR_API_KEY' }); const response = await trophy.users.getPreferences("user-123");
{ "notifications": { "achievement_completed": [ "email", "push" ], "recap": [ "email" ], "reactivation": [ "push" ], "streak_reminder": [ "email", "push" ] } }
Get a user’s notification preferences.
The user's ID in your database.
Successful operation
A user's preferences.
Notification preferences for each notification type.
Show child attributes
Was this page helpful?