User Identification in Events

Team
SDK Team
Last Updated
June 10, 2026

How to Cross-Reference Information to Identify the User

In many operational scenarios, identifying the user responsible for an event is essential for analysis, contextual actions, and auditing. Below, we list possible approaches to perform this identification based on secure technical practices compatible with privacy guidelines.

1 - Using notificationToken

This function expects a String parameter, which represents the user's notification token. On iOS, this token is provided by APNS (Apple Push Notification Service), while on Android, it is obtained through Firebase Cloud Messaging.

Android

Requirements

  • Must have a Firebase project with FCM enabled
  • React-native-firebase (documentation)
  • Minimum Compiled SDK of 31

Firebase only:

On the App.js or App.tsx file of the React-native project, call the following method:

1//Import grouplink sdk
2import * as GroupLinkSDK from '@grouplinknetwork/rn-grouplink-sdk';
3
4export default function App() {
5 React.useEffect(() => {
6 //set firebase token
7 GroupLinkSDK.setFirebaseToken(token);
8 ...
9 }, []);
10
11 return (
12 <View style={styles.container}>
13 <Text>This is a test application</Text>
14 </View>
15 );
16}

OneSignal only:

1//Import grouplink sdk
2import * as GroupLinkSDK from '@grouplinknetwork/rn-grouplink-sdk';
3import * as OneSignal from 'onesignal-node';
4
5export default function App() {
6 React.useEffect(() => {
7 //initialize Grouplink and OneSignal
8 ...
9 setPushToken();
10 }, []);
11
12 return (
13 <View style={styles.container}>
14 <Text>This is a test application</Text>
15 </View>
16 );
17}
18
19async function setPushToken() {
20 let deviceState: OneSignal.DeviceState|null = (await OneSignal.default.getDeviceState());
21 if(deviceState!=null){
22 let token : String = deviceState.pushToken;
23 console.log("PUSH TOKEN => " + token);
24 GroupLinkSDK.setFirebaseToken(token);
25 }
26 }

2 - Using notification_name:

This function expects a String parameter that represents the notification name associated with the device. This name is a customizable identifier you can use to manage or label notifications for a specific user or context.

We strongly recommend not using sensitive information in the notification_name. Instead, use unique identifiers that are properly encrypted or obfuscated. For example, using the user's session-id is a safer approach that helps ensure security and privacy when identifying devices.

Setting user notification_name:

1export default function App() {
2 useEffect(() => {
3 ...
4 GroupLinkSDK.setNotificationName(exampleNotificationName);
5 }, []);
6
7 return (
8 <View style={styles.container}>
9 <Text>This is a test application</Text>
10 </View>
11 );
12}

Getting the user notification_name:

1export default function App() {
2 useEffect(() => {
3 ...
4 let notificationName = GroupLinkSDK.getNotificationName();
5 }, []);
6
7 return (
8 <View style={styles.container}>
9 <Text>This is a test application</Text>
10 </View>
11 );
12}