You have defined website restrictions, and the API expects to see a Referer header in the API request, which seems explicitly required here:
To fix it, you would probably need the following:
headers: {
"Content-Type" => "application/x-www-form-urlencoded",
"Referer" => Discourse.base_url
}
In other words, the issue is not caused by your end.
What you can do is either:
- Try restriction by IP
- Disable the restriction until it’s fixed in the plugin
Hope that helps!