This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String email = '<pardot email/username>'; | |
String password = '<pardot password>'; | |
String userKey = '<pardot user key>'; | |
HttpRequest req = new HttpRequest(); | |
req.setEndpoint( 'https://pi.pardot.com/api/login/version/4' ); | |
req.setMethod( 'POST' ); | |
req.setBody( 'email=' + email + '&password=' + password + '$&user_key=' + userKey ); | |
HttpResponse res = new Http().send( req ); |