The status code
print(r.status_code)
405
indicates that the request was not allowed, for some reason.
That's most likely why you get the decode error: it's unlikely that you're getting valid json back if the request was rejected.
So you'll have to investigate why it was rejected:
r? You might want to use a debugger such as in PyCharm./api correct? What does the code at that endpoint do?