I'm attempting to log into my nike account using http requests and parse. Here's my request:
Parse.Cloud.httpRequest({
method: 'POST',
headers: {
'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8'
},
url: 'https://www.nike.com/profile/login',
params: {
'Content-Locale' : 'en_US',
},
body: {
'login' : <userId>,
'rememberMe' : 'true',
'password' : '<password>'
}
}).then(function(httpResponse) {
//Log
console.log(httpResponse.text);
}, function(httpResponse) {
//Log
console.error('Request failed with response code ' + httpResponse.status);
});
I'm using rest to call my function, and it's working correctly. The only problem is that it keeps returning a 403
error. Is there something I'm doing wrong with my request?
Here is all the info of the actual request I found in Safari when logging in through the browser (NOTE: I'm new to http requests).
Update:
The image above is of a valid login using the web browser.
Also, here's an image of the request and response section for more details: