"message": "CSRF token failure"


#1

Hey all. New to Runkit - it’s an awesome tool. I’m having issues however with sending a POST request via curl in the terminal to my notebook. The recurring error is: “message”: “CSRF token failure”, “csrf”: “3b3-XXX”.

Anyone else have the same problem/find a solution?

Cheers in advance


#2

What URL are you using?
Endpoint URLs should be formatted like:
https://runkit.io/{user}/{notebook_path}

Make sure you’re not using:
https://runkit.com/{user}/{notebook_path}

There’s a link at the top of your notebook that says “endpoint” which you can copy, to make sure you have the right URL.


#3

Hi - I didn’t notice your response, apologies for the late reply - yes, that indeed was the problem, thank you!


#4

I actually have another question, if that’s alright. The endpoint works fine when I cURL from the terminal window - but I want to POST a json object to it from my android app but it doesn’t seem to work. Have you experience with that? Thanks in advance.


#5

I haven’t, what error are you seeing?


#6

I’m not getting any error unfortunately, just nothing happens. I use the endpoint you mentioned before, https://runkit.io/user/notebookpath for the URL in my app, ie URL url = new URL(“https://runkit.io/user/notebookpath”); and pass it a json object. Like I said, works fine from terminal but not from the app. Any suggestions??