maicol07 Thanks very much for your help. Retrieving the cookie and using it in the browser works perfectly. I just have a problem with generating a new user. As described in the API documentation I tried the following request:
POST https://myserver/api/users
Authorization: Token <API-TOKEN>
Content-Type: application/json
{
"data": {
"attributes": {
"username": "testuser",
"email": "testuser@example.com",
"password": "$up4$3cr3tPa$$w0rd"
}
}
}
I used the same headers as with the request to retrieve the cookie (which worked perfect as said above).
But the request to create the new user returns
{
"errors": [
{
"status": "400",
"code": "csrf_token_mismatch"
}
]
}
which according to the documentation indicates that the API token is missing. Do you have any idea, what might be wrong?