function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ram ChaturvediRam Chaturvedi 

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 ?

 
ShashankShashank (Salesforce Developers) 
You may want to check whether the redirect URI that you provide is in correct format.