Hi,
I am trying to get the access token. I have following code
var request = new HttpRequestMessage(HttpMethod.Post, “https://api-v2.upstox.com/oauth/token”);
var body = new
{
client_id = _apiKey,
client_secret = _apiSecret,
code = authorizationCode,
grant_type = “authorization_code”,
redirect_uri = _redirectUrl
};
request.Content = new StringContent(JsonConvert.SerializeObject(body), System.Text.Encoding.UTF8, “application/json”);
var response = await client.SendAsync(request);
var responseContent = await response.Content.ReadAsStringAsync();
But above code gives error
Responsecontent
“{"status":"error","errors":[{"errorCode":"UDAPI100060","message":"Resource not Found.","propertyPath":null,"invalidValue":null,"error_code":"UDAPI100060","property_path":null,"invalid_value":null}]}”
Please guide me about whats wrong in the code