Skip to content

Instantly share code, notes, and snippets.

@ashwinraghav
Last active October 17, 2017 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwinraghav/3b6f8b9366f40b380fb7c635cdd3fb82 to your computer and use it in GitHub Desktop.
Save ashwinraghav/3b6f8b9366f40b380fb7c635cdd3fb82 to your computer and use it in GitHub Desktop.
Get firebase user by phone number
import firebase_admin
from firebase_admin import auth
from firebase_admin import credentials
cred = credentials.Certificate("path to service_account.json")
firebase_admin.initialize_app(cred)
user = auth.get_user_by_phone_number("your_phone")
print 'Successfully fetched user data: {0}'.format(user.uid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment