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:
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.
Anonymous users work just like regular users, except they aren't stored in the dashboard. To indicate that a user should be anonymous, simply include "anonymous": true in your user object.