Re: [disqus-dev] This application cannot create posts on the chosen forum

551 views
Skip to first unread message

Burak Yiğit Kaya

unread,
Dec 6, 2013, 6:08:19 AM12/6/13
to disqu...@googlegroups.com
Hi Edouard,

Sorry for the late response, somehow I didn't see your e-mail. That probably means your app is not associated with that forum. If you think this is a problem due to a bug on Disqus's side, feel free to open a support ticket at http://disqus.com/support/ so that it can be investigated(and tracked).


On Wed, Nov 27, 2013 at 12:40 PM, Edouard Marquez <anima...@gmail.com> wrote:
Hello,

I'm using the Disqus API to send comments from an Android application.
I use it for months on several websites and I never had a problem.

However with a new website, the POST/Create is not working and fails with this error :

{"code":12,"response":"This application cannot create posts on the chosen forum"}

My parameters are good :
api_secret : xxx
author_email = ma...@provider.com
author_name : me
message : hello
thread : 20014xxx

and the guest commenting is checked in the Disqus' settings.

Do you know where this error can came from ?
Thanks.

--
You received this message because you are subscribed to the Google Groups "Disqus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to disqus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
BYK

Alan Justino da Silva

unread,
May 28, 2014, 1:24:19 PM5/28/14
to disqu...@googlegroups.com
Hi, BYK.

You said: "your app is not associated with that forum."

How should I associate an app with a forum? How do I know if it is already?

I think that my app is already associated, as it is being used for SSO. Should I open a support ticket? 

Burak Yiğit Kaya

unread,
May 28, 2014, 1:47:46 PM5/28/14
to disqu...@googlegroups.com
Would you mind sharing your public API key and forum id for me to check?

Best,


For more options, visit https://groups.google.com/d/optout.



--
BYK

Alan Justino da Silva

unread,
May 28, 2014, 1:53:49 PM5/28/14
to disqu...@googlegroups.com
Public API Key: x9OMnUB62og1BqJ0aFhJJ7iImTRESa7LODrET6RKINSGFwj4VLTU7g5WpFZ1t743
Forum ID: omeletebr

Alan Justino da Silva

unread,
May 28, 2014, 1:54:25 PM5/28/14
to disqu...@googlegroups.com
(thanks, btw)


Em quarta-feira, 28 de maio de 2014 14h47min46s UTC-3, Burak Yiğit Kaya escreveu:

Burak Yiğit Kaya

unread,
May 28, 2014, 2:08:10 PM5/28/14
to disqu...@googlegroups.com
Hi Alan,

It indeed said "no forums" on the app details page but as you said the SSO connection was there. I tried something and it looks like it is associated with your forum now. Can you retry and let me know if it is working now?

Best,

Alan Justino da Silva

unread,
May 28, 2014, 2:22:05 PM5/28/14
to disqu...@googlegroups.com
Nice!

Now it changed the error:

"9: You cannot specify an IP address using your public key", but I am using the secret key!... ok, I dont need this.
"12: You cannot set 'date' because you are not a moderator of this thread", I am not the moderator?? Tried with PUBLIC, SECRET and API keys.

Alan Justino da Silva

unread,
May 28, 2014, 2:52:22 PM5/28/14
to disqu...@googlegroups.com
...but using the Web API Console, it worked. Now I am puzzled. Why the official lib (disqus-python) does not work?

# Python console:
>>> from disqusapi import DisqusAPI
>>> data = {'thread': u'2682906988', 'author_email': 'xxx...@yyyyy.com', 'author_name': 'Garcia Junior', 'state': 'approved', 'date': 1400681390.0, 'message': 'Quem?'}
>>> client = DisqusAPI(settings.DISQUS_SECRET_KEY, settings.DISQUS_PUBLIC_KEY)
>>> client.posts.create(api_secret=settings.DISQUS_SECRET_KEY, **data)
*** APIError: 12: You cannot set 'date' because you are not a moderator of this thread

Wondering if this is a Disqus or a disqus-python issue...
Message has been deleted

Alan Justino da Silva

unread,
May 28, 2014, 5:20:37 PM5/28/14
to disqu...@googlegroups.com
Time to dig into the wire. Using a man-in-the-middle proxy I got this:

    Host: disqus.com
    Accept-Encoding: identity
    Content-Length: 316
    User-Agent: disqus-python/unknown
    thread=2682906988&author_email=xxxxxx%40yyyyy.com&api_secret=MYBIGAPISECRETXXXXXXXXX&author_name=Garcia+Junior&state=approved&date=1400681390.0&message=Q+l%C3%B4co+heim%3F%3F&api_key=x9OMnUB62og1BqJ0aFhJJ7iImTRESa7LODrET6RKINSGFwj4VLTU7g5WpFZ1t743&ip_address=10.10.240.184

 << 400 BAD REQUEST 78B

Then, if I manually craft the body to have only api_secret and no api_key, Disqus accepted it!

thread=2682906988&author_email=xxxxxx%40yyyyy.com&api_secret=MYBIGAPISECRETXXXXXXXXX&author_name=Garcia+Junior&state=approved&date=1400681390.0&message=Q+l%C3%B4co+heim%3F%3F&ip_address=10.10.240.184

 << 200 OK 874B

So, if I provide both api_secret and api_key, Disqus will take priority on the public key over the private secret?? =/

Alright. Lets bake a patch to disqus-python...

Thanks again for all your help, BYK.

Burak Yiğit Kaya

unread,
May 30, 2014, 1:38:07 AM5/30/14
to disqu...@googlegroups.com
I almost did nothing, you did all the hard work! :)

Thanks for sharing it here and looking forward to the patch.

Best,

Alan Justino da Silva

unread,
Jun 11, 2014, 3:50:19 PM6/11/14
to disqu...@googlegroups.com
Pushed. I just inverted some warning, to notice that secret_key OR public_key should be provided, not both: https://github.com/disqus/disqus-python/pull/9

votehip...@gmail.com

unread,
Jun 18, 2014, 11:55:08 PM6/18/14
to disqu...@googlegroups.com
How can I get DISQUS on one of my WP pages instead of just on a post? Is that possible?
Reply all
Reply to author
Forward
0 new messages