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
sreenathsreenath 

integration help salesforce & aweber

HI,

      I want to integrate salesforce & Aweber. I have sample Aweber account. I am getting bad error, 400  in my system log

passing url's, you can find here.

https://labs.aweber.com/docs/authentication

Please give me suggestions regarding connection between both accounts

 

 

 

public class Aweberoauth
{
public void invokeExternalWs()
{
Http h = new Http();
   HttpRequest req = new HttpRequest();
        final string username = 'aweber provided some keys as consumer'; 
        Blob headerValue = Blob.valueOf(username);
     String authorizationHeader = 'oauth' +EncodingUtil.base64Encode(headerValue);
     
     req.setHeader('Authorization',authorizationHeader);
      
     req.setHeader('Host','https://auth.aweber.com/1.0/oauth/request_token');
    req.setHeader('Connection','keep-alive');
    req.setHeader('Content-Type', 'application/atom+xml');
    req.setMethod('POST');
     
     HttpResponse res = h.send(req);
      system.debug(res.getbody());
}
}