You need to sign in to do that
Don't have an account?
Artyom Grigor
OAth 2 with jquery.
Hello,
I try to use a OAuth 2 in html with jquery in following way:
URL=https://login.salesforce.com/services/oauth2/token
/*$.ajax({
type: "POST",
url: "<URL>",
data: "client_id="+escape(clientId)
+"&client_secret="+escape(client_secret)
+"&grant_type=password"
+"&username="+escape('artyomgrigor@gmail.com')
+"&password="+escape('<THE COMBINATION OF YOUR PASSWORD AND TOKEN>'),
success: function(data, textStatus, jqXHR){
alert( "Data Saved: " + textStatus );
}
});*/
In response I'll get nothing!!! Just 200 OK code.
Could you help me?
Are you sure the HTTP response is empty?
Seems like the browser sandbox wouldn't allow this request.
Could you please explain extended? How can I deal with this sandbox problem?
http://en.wikipedia.org/wiki/Same_origin_policy
Hi!
What you should do is make the request in PHP, put the PHP script right next to your page there and then do everything through your AJAX page. Then you can use CURL or the PHP SDK to help you.
Hope this helps!
Cheers