I am trying to create a question in StackOverFlow using write-access API(https://api.stackexchange.com/2.2/questions/add). I have provided the parameters as required but a "400(Bad Request)" error is being returned on firing a POST request. While I have tried to create the question through the API Console,with same "key" and "access_token" it works.I cannot understand what I am missing while creating the question through code.Following are the parameters that I have passed fro code:
API: https://api.stackexchange.com/2.2/questions/add
Parameters:
access_token: "TOKEN))"
body: "This is a test question body"
client_id: "3980"
key: "KEY(("
site: "stackoverflow"
tags: ".NET"
title: "This is a test title"
preview: "true"
Could anybody please help me with a solution?