You need to sign in to do that
Don't have an account?
OAuth.2.0 Username-Password Flow
Hi,
I found about the OAuth.2.0 Username-Password Flow at : https://login.salesforce.com/help/doc/en/remoteaccess_oauth_username_password_flow.htm .
I want to implement this for a mobile application using JQuery ajax call. I tried below, but it does not work for me:
$.ajax({
type:"POST",
url: loginUrl+'services/oauth2/token?'
+'&grant_type=password&client_id='+escape(clientId)
+'&client_secret='+escape(clientSecret)
+'&username=user&password=mypwd',
success: function(){
alert("Hello");
}
});
Can someone help me with a code samlpe for this.
Thanks.
hi ashi,
yoi should pass security_key with the pass word. try this
$.ajax({
type:"POST",
url: loginUrl+'services/oauth2/token?'
+'&grant_type=password&client_id='+escape(clientId)
+'&client_secret='+escape(clientSecret)
+'&username=user&password=mypwdsecurity_key',
success: function(){
alert("Hello");
}
});