User consent is collected by creating a consent record through the Consent API. In most cases, the Consent API client uses the consent localization data to construct an approval prompt that displays 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 uses the Consent API to look up the localizations for the browsing-behavior consent definition. It selects 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 stores the decision by creating a new consent record through the Consent API.