• Alan Villegas
  • NEWBIE
  • 0 Points
  • Member since 2019


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am currently using following method to get authorization code
############################
public PageReference sync(){ 
        
        settings = ConstantContactSettings.getData();
        
        PageReference ref = new PageReference(ConstantContactConstants.AUTH_ENDPOINT+
                                             'client_id='+settings.ClientID__c+
                                             '&redirect_uri='+settings.Redirect_URL__c+
                                             '&scope='+ConstantContactConstants.SCOPE+
                                             '&response_type='+ConstantContactConstants.RESPONSE_TYPE);
        
        return ref;
    }
#######################

Issue is it refreshes the page. How can I use HttpGet Callout instead of this approach and how to add query parameters to endpoint URL?