Note that there are some explanatory texts on larger screens.

plurals
  1. PODisqus API: create comment as guest
    primarykey
    data
    text
    <p>I'm trying to use the Disqus API to add a post to an existing discussion/forum. In the documentation I can read that I can send a comment without authentication, as a guest. The documentation says this: <a href="http://disqus.com/api/docs/posts/create/" rel="nofollow noreferrer">http://disqus.com/api/docs/posts/create/</a></p> <blockquote> <p>Anonymous comments are allowed under two conditions:</p> <ol> <li>You're using legacy auth, and your secret key</li> <li>You're using your public key, you've come from a verified referrer, you're unauthenticated, and the forum you're attempting to create the post on is listed in the applications trusted forums.</li> </ol> <p>To create an anonymous comment, simply pass author_email and author_name, and optionally the author_url parameter.</p> </blockquote> <p>So I use this code to create a comment in PHP. (I use a very simple cURL class but the problem isn't there because I get the same one in the console on disqus.com/api)</p> <pre><code>$curl = new Curl(1); $curl-&gt;addPostVar('thread','THREAD_ID'); $curl-&gt;addPostVar('message','Text message'); $curl-&gt;addPostVar('author_email','My email'); $curl-&gt;addPostVar('author_name','My name'); $curl-&gt;addPostVar('api_secret','My application secret API key'); echo $curl-&gt;exec('https://disqus.com/api/3.0/posts/create.json'); </code></pre> <p>But I get the error through JSON</p> <pre><code>{"code": 4, "response": "You must be authenticated to perform this action"} </code></pre> <p>I know someone else has already asked this (<a href="https://stackoverflow.com/questions/13897710/disqus-api-create-post-error">Disqus API create post error</a>) but the response suggested was to use OAuth and get authenticated. But I don't want to authenticate, I want to send a guest comment with name and email. Where I'm wrong?</p> <p>Thank you very much for any replies.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload