Guest User

Untitled

a guest
Aug 10th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. {
  2. "rules": {
  3.  
  4. ".read": "auth.uid == 'foobar'",
  5. ".write":"auth.uid == 'foobar'"
  6. }
  7. }
  8.  
  9. url='https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=<my-api-key>'
  10. data={
  11. "email": "my-email",
  12. "password": "my-pass",
  13. "returnSecureToken": "true"
  14. }
  15. contents = requests.post(url,data)
  16. idToken= contents.json()["idToken"]
  17. payload = {"auth":idToken}
  18. #i also tried sending uid with payload
  19. #payload={"auth":idToken,"uid":"foobar"}
  20. url="https://my_app_id.firebaseio.com/Home01/.json";
  21. contents=requests.delete(url,data=payload)
Add Comment
Please, Sign In to add comment