Skip to content

Commit 77e95b7

Browse files
authored
Update Mailchimp.gs
1 parent 3354c8a commit 77e95b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

samples/Mailchimp.gs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
var CLIENT_ID = '...';
88
var CLIENT_SECRET = '...';
9-
var OAUTH_HOST = 'login.mailchimp.com';
109

1110
/**
1211
* Authorizes and makes a request to the Docusign API.
@@ -47,8 +46,8 @@ function reset() {
4746
function getService() {
4847
return OAuth2.createService('Mailchimp')
4948
// Set the endpoint URLs.
50-
.setAuthorizationBaseUrl('https://' + OAUTH_HOST + '/oauth2/authorize')
51-
.setTokenUrl('https://' + OAUTH_HOST + '/oauth2/token')
49+
.setAuthorizationBaseUrl('https://login.mailchimp.com/oauth2/authorize')
50+
.setTokenUrl('https://login.mailchimp.com/oauth2/token')
5251

5352
// Set the client ID and secret.
5453
.setClientId(CLIENT_ID)
@@ -74,7 +73,7 @@ function authCallback(request) {
7473
if (authorized) {
7574
// Get the user info to determine the data center needed for
7675
// future requests.
77-
var url = 'https://' + OAUTH_HOST + '/oauth2/metadata';
76+
var url = 'https://login.mailchimp.com/oauth2/metadata';
7877
var response = UrlFetchApp.fetch(url, {
7978
headers: {
8079
Authorization: 'Bearer ' + service.getAccessToken()

0 commit comments

Comments
 (0)