You are passing in a string;
headers can’t ever be a JSON encoded string, it is always a Python dictionary.
requests API clearly states that
headers must be a dictionary:
headers– (optional) Dictionary of HTTP Headers to send with the
JSON data is something you’d send as content to another server, not something you’d use to communicate with a Python API.