You need to sign in to do that
Don't have an account?

I am not getting authorization code after authorization ?
I am trying to request one salesforce account by another .but after authorization i am not getting any code . Can anybody help me ?
request.setBody('response_type=code&client_id=3MVG9Y6d_Btp4xp7CF6KDJgV3ZvvwY_ISYLO7QsBqp9Wc0.u_AYgBO.If4xxxxxxxxxxxxxxxxxxxx4EBsjLo&redirect_uri=https://c.ap1.visual.force.com/apex/customRedirectedurl&state=mystate');
after this
result=ApexPages.currentPage().getParameters().get('code');
it its null ; Why ?
request.setBody('response_type=code&client_id=3MVG9Y6d_Btp4xp7CF6KDJgV3ZvvwY_ISYLO7QsBqp9Wc0.u_AYgBO.If4xxxxxxxxxxxxxxxxxxxx4EBsjLo&redirect_uri=https://c.ap1.visual.force.com/apex/customRedirectedurl&state=mystate');
after this
result=ApexPages.currentPage().getParameters().get('code');
it its null ; Why ?


You may want to check whether the redirect URI that you provide is in correct format.