0

Full context

I'm POST-ing the following URl from Advanced REST client and getting a 403 forbiddenresponse.

http://[my discourse ip]/posts.json?title="Created from the advanced REST client"&category="2"&raw="A whole bunch of text about a topic"&api_key="[key from admin tab]"&api_username="[admin username]"

I built up the URL by referencing this, this, and this (although I'm looking for a language agnostic solution). I'm hoping I missed something obvious.

Why am I getting a forbidden response as an admin user with an api key?

(Pointing me to How to reverse engineer the discourse api will not help me, I've read it twice)

Matt
  • 1,674
  • 2
  • 16
  • 34

1 Answers1

0

Do you actually use quotes ("...") in URL parameters? This is not how URL parameters looks like. In ARC you have an option to encode parameters (dropdown menu next to the URL field) and you should encode it before sending a request. Without quotes. Your url should looks like:

http://[my discourse ip]/posts.json?title=Created+from+the+advanced+REST+client&category=2&raw=A+whole+bunch+of+text+about+a+topic&api_key=[key from admin tab]&api_username=[admin username]

Pawel Uchida-Psztyc
  • 3,735
  • 2
  • 20
  • 41