Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase push key - allowed characters

I am wondering what kind of characters are allowed in the push key. Does it generate also a symbol underscore(_)? I always get a push key with letters with -.

like image 507
user3637775 Avatar asked Dec 14 '16 12:12

user3637775


1 Answers

Push keys use a modified Base64 alphabet:

-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz

They are comprised of a timestamp and a random value. The algorithm is described here.

With Firebase keys in general, there is a small set of illegal characters and they are listed in this answer:

Character Set Limitations

Note that URLs used to construct Firebase references may contain any unicode characters except:

  • . (period)
  • $ (dollar sign)
  • [ (left square bracket)
  • ] (right square bracket)
  • # (hash or pound sign)
  • / (forward slash)
like image 181
cartant Avatar answered Sep 16 '22 19:09

cartant