Getting the current playerId

Can someone please provide a real life example of retrieving a OneSignal playerId?  The init works and I can see the player in the dashboard, but I want to store the value in my DB. I can’t seem to get it back. I found the callback information in their documentation, but I’m not clear on how to implement it.

<lua>

require…

function IdsAvailable(userID, pushToken)
     print(“PLAYER_ID:” … userID)
     if (pushToken) then – nil if user did not accept push notifications on iOS
         print(“PUSH_TOKEN:” … pushToken)
     end
end

init…

OneSignal.IdsAvailableCallback(IdsAvailable)

</lua>

Disregard. This works using the code above. I had another error that wasn’t showing up in adb.

Disregard. This works using the code above. I had another error that wasn’t showing up in adb.