Click or drag to resize
KomfoProviderRetrieveCustomAudienceAsync Method
Retrieves the custom audience asynchronously.

Namespace: KomfoSharp.Provider
Assembly: KomfoSharp (in KomfoSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public virtual Task<CustomAudience> RetrieveCustomAudienceAsync(
	string accessToken,
	string customAudienceId
)

Parameters

accessToken
Type: SystemString
The access token.
customAudienceId
Type: SystemString
The custom audience identifier.

Return Value

Type: TaskCustomAudience
The custom audience.

Implements

IKomfoProviderRetrieveCustomAudienceAsync(String, String)
Examples
try
{
  var customAudience = await komfoProvider.RetrieveCustomAudienceAsync("<your_access_token>", customAudienceId);
  this.ShowCustomAudience(customAudience);
}
catch (KomfoProviderException ex)
{
  if (ex.KomfoStatusCode == KomfoStatusCode.AudienceIdIsNotValidCustomAudience)
  {
    Console.WriteLine("The custom audience doesn't exist.");
  }
}
See Also