0

I'm trying get access token in my angular app but I get the "400 error bad request" error. From postman there is no problem and I get the token this is in my js code. I removed some info from my code here.

return $http(
{
    url: 'https://login.salesforce.com/services/oauth2/token',
    method: "POST",
    data : {
        'grant_type':'password',
        'client_id' : 'jD7TnTNigSlQouxCndKvmuhFoPrT8U5ScDsskdq7A',
        'client_secret' : '6148471690',
        'username' : 'test.com',
        'password':'HPLCGE1rjFyERnD6CE'
    },
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
});
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Alex Koretzki
  • 155
  • 2
  • 11

0 Answers0