flowerchecker / plant-id-examples

Example client's code for work with Plant.id identification API in various languages
MIT License
127 stars 44 forks source link

[Swift] CSRF verification failed #23

Closed mrtnbroder closed 2 years ago

mrtnbroder commented 2 years ago

Hi there,

I am currently trying to add plant identification to my iOS App, but I am facing an issue with my request.

When I try to POST an identification request, the response is html with the following error:

CSRF verification failed. Request aborted.

But I'm not seeing anything about a csrf token within the documentation. Is there something I'm missing?

Krejdom commented 2 years ago

Hi Martin, CSRF is not needed when interacting with our API. The only thing you need for authentication is your API key. Could you please share the code (here or via email) how you send the request, so I can see if there is any other problem?

mrtnbroder commented 2 years ago

I found the issue, I was having a small typo within the url 🤦 it is now working 👍

Krejdom commented 2 years ago

Good to hear that! :)