didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

Generate consent string #14

Closed rodrigomatosc closed 2 years ago

rodrigomatosc commented 2 years ago

I have a question about how to generate the Base64 consent string, I saw that there is getJavaScriptForWebView and getQueryStringForWebView but I don't know if these methods generate this string.

Best regards.

felipe-saez commented 2 years ago

Hi Rodrigo,

Apologies for not getting back to you earlier. If what you mean is the TCF Consent String (https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md#about-the-transparency--consent-string-tc-string), you can access it by reading the consentString property of the object returned by this method https://developers.didomi.io/cmp/mobile-sdk/react-native/reference#getuserstatus:

await Didomi.getUserStatus();

let consentString = userStatus.consentString;

Please let me know if this is not what you were looking for.

Kind regards,

Felipe