Core 1.0.0 - Unity C# API Reference Core 1.0.0 - Unity C# API Reference
Core 1.0.0 - Unity C# API Reference Core 1.0.0 - Unity C# API Reference
© 2025 Chartboost, Inc. All rights reserved.

Interface IConsentManagementPlatform

Chartboost Core’s CMP in charge of handling user consent management. Chartboost Core defines a unified API for publishers to request and query user consent, and relies on a 3rd-party CMP SDK to provide the CMP functionality.

Namespace: Chartboost.Core.Consent
Assembly: Chartboost.Core.dll
Syntax
public interface IConsentManagementPlatform

Properties

Consents

Detailed consent status for each consent standard, as determined by the CMP. Returns an empty dictionary if no consent adapter module is available.

Declaration
IReadOnlyDictionary<ConsentKey, ConsentValue?> Consents { get; }
Property Value
Type Description
IReadOnlyDictionary<ConsentKey, ConsentValue>

ShouldCollectConsent

Indicates whether the CMP has determined that consent should be collected from the user. Returns false if no consent adapter module is available.

Declaration
bool ShouldCollectConsent { get; }
Property Value
Type Description
bool

Methods

DenyConsent(ConsentSource)

Informs the CMP that the user has denied consent. This method should be used only when a custom consent dialog is presented to the user, thereby making the publisher responsible for the UI-side of collecting consent In most cases ShowConsentDialog(ConsentDialogType) should be used instead.

Declaration
Task<bool> DenyConsent(ConsentSource source)
Parameters
Type Name Description
ConsentSource source

The source of the new consent. See the ConsentSource documentation for more info

Returns
Type Description
Task<bool>

Indicates if the operation went through successfully or not

GrantConsent(ConsentSource)

Informs the CMP that the user has granted consent. This method should be used only when a custom consent dialog is presented to the user, thereby making the publisher responsible for the UI-side of collecting consent In most cases ShowConsentDialog(ConsentDialogType) should be used instead.

Declaration
Task<bool> GrantConsent(ConsentSource source)
Parameters
Type Name Description
ConsentSource source

The source of the new consent. See the ConsentSource documentation for more info

Returns
Type Description
Task<bool>

Indicates if the operation went through successfully or not

ResetConsent()

Informs the CMP that the given consent should be reset. If the CMP does not support the ResetConsent() function or the operation fails for any other reason, the Task is executed with a false parameter.

Declaration
Task<bool> ResetConsent()
Returns
Type Description
Task<bool>

Indicates if the operation went through successfully or not

ShowConsentDialog(ConsentDialogType)

Instructs the CMP to present a consent dialog to the user for the purpose of collecting consent.

Declaration
Task<bool> ShowConsentDialog(ConsentDialogType dialogType)
Parameters
Type Name Description
ConsentDialogType dialogType

The type of consent dialog to present. See the ConsentDialogType documentation for more info. If the CMP does not support a given type, it should default to whatever type it does support.

Returns
Type Description
Task<bool>

Indicates if the operation went through successfully or not

Events

ConsentChangeWithFullConsents

Called whenever the Consents value changed.

Declaration
event ChartboostCoreConsentChangeWithFullConsents ConsentChangeWithFullConsents
Event Type
Type Description
ChartboostCoreConsentChangeWithFullConsents

ConsentModuleReadyWithInitialConsents

Called when the initial values for Consents first become available for the current session.

Declaration
event ChartboostCoreConsentModuleReadyWithInitialConsents ConsentModuleReadyWithInitialConsents
Event Type
Type Description
ChartboostCoreConsentModuleReadyWithInitialConsents