User consent is collected by creating a consent record through the Consent API. In most cases, the Consent API client uses consent localization data to construct an approval prompt to display to the user. This prompt should include text describing what data is collected and for what purpose, allowing the user to make an informed decision about the value of sharing his or her data.

For example, a web application needing to collect consent for a user's browsing behavior would use the Consent API to look up the localizations for the browsing-behavior consent definition. It would select the localization appropriate for the user and use data from the localization resource to construct a consent prompt for display to the user. After the user is prompted and makes a decision, the client could store the decision by creating a new consent record through the Consent API.