How can we help?

How does the user key work? What about anonymous users?

When you request a feature flag, you need to pass in a user object. The only mandatory field is the key. In JSON, this looks like this:

{"user": "foo@example.com"}

The only requirement for keys is that they uniquely identify the user visiting your site. For authenticated users, an e-mail address or the primary key of that user from your database makes a perfect user key. For unauthenticated users, a session ID or UUID works– as long as the same session ID or UUID is associated with the same anonymous user on repeat visits to your site.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request