Project

General

Profile

Can't authenticate via curl REST call

Added by Wolfram Sang about 8 years ago

Hi,

might be super trivial, but I couldn't find the solution yet. I want to update a wiki page via curl as described in http://www.redmine.org/projects/redmine/wiki/Rest_api_with_curl. This is the file:

<?xml version="1.0"?>
<wiki_page>
<text>
Hallo :)
</text>
</wiki_page>

This is the command line:

curl -v -u <myusername> -H "Content-Type: application/xml" -X PUT --data-binary "@$file" http://demo.redmine.org/projects/sample-project/wiki/Wiki

But the result I get is:

...
<h2>422</h2>
<p id="errorExplanation">Invalid form authenticity token.</p>
...

What am I missing?

Thanks!