Hi all,
I am trying to estaablish a flow that interfaces the Perdoo API (https://api-docs.perdoo.com/)
I can make the flow work from a browser, but I cannot figure out how to specify correctly the email and password required to obtain the token (https://api-eu.perdoo.com/api-token-auth)
Using the HTTP step
- Method: POST
- URI: https://api-eu.perdoo.com/api-token-auth
- Header:
-- Content-Type: application/vnd.api+json
I've tried specifying credentials using basic authorisation, but below fault is returned independently of whether I do that or not.
Where I think it goes wrong is how to specify the body.
The fault returned is:
"{"errors":{"email":["This field is required."],"password":["This field is required."]}}"
Any help is appreciated
Thanks
That worked - Thanks all that contributed!
Based on examples in their docs, try one of these:
1. Content-type: application/vnd.api+json
Body:
{
"data": {
"type": "obtainJwtToken",
"id": null,
"attributes": {
"email": "xxxx@xxx",
"password": "xxx"
}
}
}
2. Or set
Content-Type: application/x-www-form-urlencoded
Body: email=myuser%40test.com&password=xxx
Thanks! That solved the immediate parsing error, but now I get this error:
{"errors":[{"detail":"Received document does not contain primary data","status":"400","source":{"pointer":"/data"},"code":"parse_error"}]}
Any ideas are most welcome!
Hi @Anonymous
Try with the double quotes around the email and password
{
"email":"xxxx",
"password":"dddd"
}
Thanks, but then it immidiately returns "Enter valid JSON"
Other ideas?
Hi @Anonymous
Try this in your HTTP Body