-
As the title suggests, I make the call with:
to
So the question is, when I then have to send that cookie back with the body fields of csrf, transaction-id, etc do i send it as one header with all those three imploded by a space, or do i set multiple I'm at the point now that I send all of that to the authorize url but get back the location header of the same url i posted to, and not the one with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I hate myself! After pretty much going through every step from the start again to see what I might have missed, I noticed that my email for the For future reference though (as I think others had correctly noted) you need all parts of the cookies combined, so when looping through headers I had adjusted one of the other examples in discussions to just be this if (isset($tmp[strtolower($h[0])])) {
$tmp[strtolower($h[0])] = sprintf("%s %s", $tmp[strtolower($h[0])], isset($h[1]) ? $h[1] : $h[0]);
} else {
$tmp[strtolower($h[0])] = isset($h[1]) ? $h[1] : $h[0];
} so if it finds a header key already existing it just appends the new part to the end separated by a space. Sending this worked for me, so I guess my answer was send as one header imploded by space AND MAKE SURE YOU ENTER YOUR DAMN EMAIL CORRECTLY! |
Beta Was this translation helpful? Give feedback.
-
Hello, I am trying from Postman and have a similar issue with Step 2 from: https://tesla-api.timdorr.com/api-basics/authentication I pass all 5 input form hidden parameters as separate key-value pairs, along with the correct identity and credential as post body (form-urlencoded). I am also passing Cookie as header with the value of tesla-auth.sid, but I keep getting 200 OK with no location in response header and same response as Step 1 in the documentation. Any idea what might be going wrong here? |
Beta Was this translation helpful? Give feedback.
I hate myself! After pretty much going through every step from the start again to see what I might have missed, I noticed that my email for the
identity
field I'd typed as,.co.uk
instead of.co.uk
So me getting the 302 was it redirecting me back to the same page because my login was incorrect not because I was doing something wrong.
I updated it and got back the 200 OK page with the passcode instead.
For future reference though (as I think others had correctly noted) you need all parts of the cookies combined, so when looping through headers I had adjusted one of the other examples in discussions to just be this