---
updatedAt: 2026-04-07T10:11:25.000Z
agentTools:
  siteIndex: https://developers.liveramp.com/llms.txt
  projectIndex: https://developers.liveramp.com/authenticatedtraffic-api/v1.0/llms.txt
---

# Obtaining Required Identifiers

Your monetization partners may directly accept a supported identifier (such as an email address or phone number) or expect you to pre-resolve a user identifier to a LiveRamp identity envelope. Ask your partner(s) which identifiers they accept, then implement one of the two workflows below.

[block:api-header]
{
  "title": "Obtain Email/Phone"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "if (user) {\n  // The user's ID, unique to the Firebase project.\n  // Do NOT use this value to authenticate with your backend server,\n  // if you have one. Use getTokenWithCompletion:completion: instead.\n  NSString *email = user.email;\n  NSString *uid = user.uid;\n  NSMutableString *multiFactorString = [NSMutableString stringWithFormat:@\"MultiFactor: \"];\n  for (FIRMultiFactorInfo *info in user.multiFactor.enrolledFactors) {\n    [multiFactorString appendString:info.displayName];\n    [multiFactorString appendString:@\" \"];\n  }\n  NSURL *photoURL = user.photoURL;\n  // ...\n}MainViewController.m\n\n",
      "language": "objectivec",
      "name": "Firebase, iOS"
    }
  ]
}
[/block]

<https://firebase.google.com/docs/auth/ios/start#objective-c_6>

[block:code]
{
  "codes": [
    {
      "code": "FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\nif (user != null) {\n    // Name, email address, and profile photo Url\n    String name = user.getDisplayName();\n    String email = user.getEmail();\n    Uri photoUrl = user.getPhotoUrl();\n\n    // Check if user's email is verified\n    boolean emailVerified = user.isEmailVerified();\n\n    // The user's ID, unique to the Firebase project. Do NOT use this value to\n    // authenticate with your backend server, if you have one. Use\n    // FirebaseUser.getIdToken() instead.\n    String uid = user.getUid();\n}",
      "language": "text",
      "name": "Firebase, Android"
    }
  ]
}
[/block]

<https://firebase.google.com/docs/auth/android/start#access_user_information>

[block:callout]
{
  "type": "info",
  "title": "Using a different authentication system and unsure where to start?",
  "body": "Email us at atsimplementation@liveramp.com!"
}
[/block]

[block:api-header]
{
  "title": "Obtain Identity Envelope"
}
[/block]

If your partner SDK expects an identity envelope, you will need to resolve your user identifier to an identity envelope.

While it's possible to automatically run a Cloud Function when a Firebase `onCreate()` or `onDelete()` is triggered, there is no `onSignIn()` event. Therefore, you will need to run a custom function that fires (either server-side or client-side) once the user has signed in.

The function will need to:

* Accept your supported identifier
* Hash the identifier to supported isotopes (MD5, SHA1, SHA256)
* Call the ATS API
* Process the response and handle errors
* Return the envelope

It is recommended to run this function every time the user opens a new app session.