However when I do same thing with POSTMAN client it successfully creates access tokens. But not in axios.
I also binded parameters in Form Data.
onst headers = {
}
const body = {
'code': '1000.6391352c83fd8e4fe0561b22d1591347.1f31d1a5432dd0c8b72a8cbd838b386b',
'client_id': '1000.743Z8NDRB7LNTVTKE2L9C196GTVUJR',
'client_secret': '15e4d9cd917f3fab2197720f962d04bdacc0358b62',
'grant_type': 'authorization_code',
}
let bodyFormData = new FormData();
bodyFormData.append('code', '1000.2274a3be9db4074cc008ff34c222a5fb.06eb183aaeba0ffe9d8188ea9ee524ba');
bodyFormData.append('client_id', '1000.2WVATI2TW9YZNRGWNMN9YSS9CXZ4AJ');
bodyFormData.append('client_secret', '15e4d9cd917f3fab2197720f962d04bdacc0358b62');
bodyFormData.append('grant_type', 'authorization_code');
const url = 'https://accounts.zoho.com/oauth/v2/token';
axios.request({
url: 'oauth/v2/token',
method: "post",
baseURL: "https://accounts.zoho.com/",
data: bodyFormData,
headers: headers,
}).then(function (res) {
console.log(res.data);
});