I don't have a Mac (but I'll look for a Rapid Application Dev API tool for PC, thanks for that) but I had a go in Python. My Python knowledge is non existent (so anything I do with that might be idiot-error rather than competent.)
With that said if I do
Python:
headers = {
"Authorization": "MY_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.get("https://www.teslafi.com/feedapi", headers=headers)
print(response)
I DO get a 200 response (but I get an error if I then attempt to extract/decode the JSON from the response object - but that may well be idiot-error - but my syntax is lifted from reviewing a number of Github libraries for TeslaFi API ... but maybe a GET [
to TeslaFi] without any COMMAND doesn't return a JSON payload)
But if I try to do
Python:
url = f'https://www.teslafi.com/feed.php?token=' + access_token + f'&command=lastGood'
response = requests.get(url)
print(response)
I get a 500 Error
I've clutz around with trying to combine the access token "headers" into the URL including command, and passing a "params=payload" additional element to the requsts.get() function ... and spent time trying this-and-that ... which is, sadly, exactly the sort of approach that I can't spare the time for - and the sole reason why I got excited that the TeslaFi API looked like it would give me a leg-up compared to having to build, and debug/resolve, the Tesla API direct.
I have tried print(response.text) (not sure at what point in my process and which of the above attempts were in progress) and I got a bunch of HTML which was basically a Username / Password / SUBMIT form ... notwithstanding that I was using the FEED API URL, nor that the requested content-type was JSON ...
... which might lead to me finding that thisn API is one of a number of "minor" API interfaces which are terribly badly put together from the perspective of someone trying to USE them!
We have loads of big companies who require "Just upload your invoice to our Accounts Package API" (a data-payload type thingie of Invoice Line Items). They all use the same underlying business-market-sector API standard, NONE of them have implemented the XML version (which has been available since the 90's and which I would at the very least be able to verify that my data was correctly presented) and thus all of them require CSV, and NONE of them have any error feedback. The most common error I have had is "
Your CSV has the wrong number of fields, 20 required" whereas the correct number is NOT 20 (pointed that out to their support: "Must be an error in our code" ... still not fixed, so the next poor soul is also going to have to guess the right style / data type / length for every single CSV field. And they expect every single supplier, including tiny (like us), to build an interface that supports their (uniquely modified) API ...
Sorry, rant over!