Explore Courses Blog Tutorials Interview Questions
+1 vote
in Salesforce by (11.9k points)

I am examining a sample which is in the salesforce developer site.

In that sample when we click a link it will be redirected to the salesforce login page. If the login successful, then an access token is issued.

I dont want my application to redirect to the salesforce login page. In the existing sample the environment variable is set to,


What should I do to avoid redirecting to salesforce login page.

1 Answer

+1 vote
by (32.1k points)
edited by

It seems that you need to implement OAuth 2.0 username-password flow in order to avoid redirection. 

Want to learn Salesforce from basics! Here's the right video for you on Salesforce provided by Intellipaat:

Try the following code to solve your problem:






Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories