Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Does auto generated Firestore Document ID have character restriction?

42 views
Skip to first unread message

_ resun

unread,
Nov 12, 2024, 12:08:40 PM11/12/24
to Firebase Google Group
Hello!

I was wondering is there any character restriction for the auto generated Firestore Document IDs. Are they always alphanumerics  or could they also contain symbols?

Thank you!

Joe Spiro

unread,
Nov 12, 2024, 12:11:43 PM11/12/24
to Firebase Google Group
Hello,

As discussed in Usage and limits::Collections, documents, and fields the restrictions are as follows:
  1. Must be valid UTF-8 characters
  2. Must be no longer than 1,500 bytes
  3. Cannot contain a forward slash (/)
  4. Cannot solely consist of a single period (.) or double periods (..)
  5. Cannot match the regular expression __.*__
  6. If you import Datastore entities into a Firestore database, numeric entity IDs are exposed as __id[0-9]+__


Reply all
Reply to author
Forward
0 new messages