user
object to store any app-specific metadata. This field is a generic JSON object up to 1KB in size. The JSON can contain arbitrary key-value pairs where the key is a string
and value is a string
, integer
, or boolean
(ie {username: 'name', isVerified: true, age: 23}
).
Use the If a matching user is found for the ID and the custom metadata object is valid, the method will return the corresponding
PrivyClient
’s setCustomMetadata
method from the users()
interface to set the custom metadata field for a user by their ID. As parameters, pass the user’s ID as a string
and the JSON object that you wish to set as custom metadata:User
object with updated custom metadata. If no matching user is found, or the custom metadata input is malformed or too large (>1KB), the method will throw an error.