title: Unsupported Media type error for request.post
body: <p>I am working on a api call with python. Here I have the parameters in json format that was generated in the website I am trying to access. But when I try to run the program I get an <code>415: unsupported Media Type</code> error. Not sure what I am doing wrong, as I am using the parameters generated by the website.</p>
  
  <p>this is my code so far</p>
  
  <pre><code>def jprint(obj):
      text = json.dumps(obj, sort_keys=True, indent=4)
      print(text)
  
  
  url = 'https://einv-apisandbox.nic.in/gstvital/api/auth'
  
  parameters = {
    "header": {
      "ClientID": "TheClientIDGoesHere",
      "ClientSecret": "TheClientSecretGoesHere"
    },
  
    "data": {
      "UserName": "Username",
      "Password": "Password",
      "AppKey": "AppKey",
      "ForceRefreshAccessToken": "false"
    }
  }
  
  response = requests.post(url, params=parameters)
  
  jprint(response.json())
  </code></pre>
  
  <p>In the above code, I have removed the actual parameters and replaced them with dummy text. But when I try them with the actual parameters I get the following error</p>
  
  <pre><code>{
      "status": 415,
      "title": "Unsupported Media Type",
      "traceId": "|df46105a-49e1b43f80675626.",
      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13"
  }
  
  </code></pre>
  
  <p>One thing I changed was this code <code>"ForceRefreshAccessToken": "false"</code>. In the generated json code, the <code>false</code> was not inside quotes </p>
  
  <p>Not sure what I am doing wrong. Please help me.</p>