Currently I am trying on oAuth2 user-agent flow between two SF orgs. Referring https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_user_agent_flow.htm&language=en_US guidelines.

I am stuck at 'User Approves Access and Client Receives Callback from Salesforce' step mentioned in the guideline. As per the flow callback uri redirect user with access_token, token_type etc. values appended after(#) sign. In apex I am unable to retrieve the access_token using getParameters(). Also failed to read the completed url inside Apex.

Any idea?

1 Answer 1


Got answer myself by reading SF guidelines on user agent authentication. We can read the access_token and other related parameters through client side scripting i.e. JavaScript.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .