Creating users
This recipe explains how to create user accounts via the Snag API.
Overview
The POST /api/users/metadatas
allows you to create user account objects in Snag’s system which can then be used to migrate users from your existing system. This also allows you to attach useful metadata to new and existing users, such as their social network handle, which can be used for a more seamless user experience in-app and for use in the loyalty program.
Steps to create a user
Example use-case
For the case where you are migrating your users from an existing system to Snag, you would loop over each of your users and, for each, hit the POST /api/users/metadatas
endpoint with their wallet address and any metadata you wish to attach. Below is an example request which creates a user account for the given wallet address and attaches various social network handles.
Example Request
- Note: only the
walletAddress
property is required as this is the identifier for the user being created.
Example Response
Feedback
We value your feedback! Please share your thoughts below: