Disqus

This endpoint returns the signed attributes needed to sign in users to Disqus without any extra actions taken by users other than being signed into Universe already.

https://help.disqus.com/customer/portal/articles/236206-integrating-single-sign-on

GET /disqus

This endpoint returns the customer's signed attributes for Disqus SSO. The values should be embedded on the page before the Disqus Embed. The remote_auth_s3 and api_key value should be passed to this Javascript, loaded before the Embed:

var disqus_config = function () {
    this.page.remote_auth_s3 = api_response.remote_auth_s3;
    this.page.api_key = api_response.api_key;
}

Request

No parameters required (besides your API key of course).

Responses

Success: Not logged in, returns attributes that leave customer signed out

{
    "status": "ok",
    "remote_auth_s3": "e30= b4b1b53a1d3cdf239abd170f383ec7bf47176567 1388534400"
    "api_key": "DISQUS-PUBLIC-API-KEY"
}

Success: Logged in, returns base64 encoded and signed attributes containing customer ID, email, and username

{
    "status": "ok",
    "remote_auth_s3": "eyJpZCI6OTk5OTksInVzZXJuYW1lIjoic3BhcmtzbGljZTEiLCJlbWFpbCI6InNwYXJrYXJ0QHNwYXJrYXJ0LmNvbSJ9 332069b996556f94ef7003a8be98f826da96a623 1388534400"
    "api_key": "DISQUS-PUBLIC-API-KEY"
}

Error: Disqus public and/or private key environment variables are not set

{
    "status": "error",
    "messages": ["Disqus keys are not set up"]
}