Back to All

Problems with GoNative's native function to get the UserId / PlayerID

I have paid OneSignal, and I am customizing the JS in website-overrides with the function of your documentation.

var gn_oneSignalUserId;

function gonative_onesignal_info(oneSignalInfo){
gn_OneSignalUserId = oneSignalInfo.oneSignalUserId;
}

But it doesn't work because it doesn't extract me the UserID/PlayerID of the OneSignal session and I send it the AppID, KeyID.

Please help me to know how to capture that data to be able to send the PlayerID to save in my Server with the Database. I have an API, I just need to capture the PlayerID of the session that is starting in the APP compiled in GoNative.