Integrating AudienceSync

Requirements

Access to AudienceSync is currently available to select partners as we make the product more widely available. Once enabled, you can refer to this documentation on how to implement AudienceSync with your Disqus-powered site(s).

AudienceSync builds off of Disqus’s API, and its OAuth authorization process. To use AudienceSync, publishers will require a Disqus API application, and will need to undertake some integration development. Note: Guest commenting must be disabled in order for Audience Sync to function properly.

Introduction

AudienceSync is a tool that funnels Disqus users into acknowledging their participation on a publisher website, and to provide their contact information to that publisher. Publishers are free to use that contact information per their own terms of service – for instance, they can use it to create a native user account inside their own authorization service.

This chart illustrates how AudienceSync is transacted between the user and site the first time they visit:

Create an API application

In order to use AudienceSync you’ll need Disqus API keys, which you can get by creating a Disqus API application (if you haven’t already).

Configure your API application

This is done at your API application > Settings page. Three settings in particular pertain to AudienceSync:

  1. Terms of Service URL (optional) – if this value is specified, a link to the application’s terms of service becomes present in the AudienceSync (and OAuth) dialogs.
  2. Callback URL – this is the URL a user is redirected to after authorizing, commonly called a redirect_uri in many OAuth implementations.
  3. Icon — this is the icon which appears in the OAuth dialog.

Additionally, make sure “Authenticate users with OAuth” is enabled under “Authentication”.

Implement the AudienceSync code

See our Disqus API: Authentication via AudienceSync documentation.

Configure the Disqus embed to use your application’s public API key

This is done using the disqus_config callback.


var disqus_config = function() {
    this.page.api_key = 'public_api_key';
}

If you’ve already specified this value as part of your SSO configuration, you’re already done.

AudienceSync Feedback

As AudienceSync is a legacy feature, it is currently only available to sites who have had it previously enabled and select partners. That being said, we're still interested in hearing feedback on this feature, ranging from potential use cases to simply expressing interest in utilizing this type of feature for your site. If you'd like to provide us with any of this feedback, you may do so here.

Did you find this article helpful?