I am following the README on FUEL SDK and trying to get access to SFMC via SOAP API.

    auth = SalesforceTokenProvider()
    access_token = auth.get_token()

    myClient = FuelSDK.ET_Client(
          'clientid': Config.SALESFORCE_CLIENT_ID,
          'clientsecret': Config.SALESFORCE_CLIENT_SECRET,
          'grant_type': 'client_credentials',
          'defaultwsdl': 'https://SUBDOMAIN.soap.marketingcloudapis.com/etframework.wsdl',
          'authenticationurl': 'https://SUBDOMAIN.auth.marketingcloudapis.com/v2/token',
          'baseapiurl': "https://SUBDOMAIN.rest.marketingcloudapis.com/",
          'soapendpoint': "https://SUBDOMAIN.soap.marketingcloudapis.com/Service.asmx",
          'wsdl_file_local_loc': r'ExactTargetWSDL.xml',
          'useOAuth2Authentication': True,
          'authorizationCode': access_token

Then I get the following error:

Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'unsupported_grant_type', 'error_description': 'Use "authorization_code" or "refresh_token" or "client_credentials" or "urn:ietf:params:oauth:grant-type:jwt-bearer" as the grant_type.', 'error_uri': 'https://developer.salesforce.com/docs'}

I was looking at the source code client.py and it has this:

            legacyString = "?legacy=1"
            if legacyString not in self.auth_url:
                self.auth_url = self.auth_url.strip()
                self.auth_url = self.auth_url + legacyString

            r = requests.post(self.auth_url, data=json.dumps(payload), headers=headers)
            tokenResponse = r.json()
            if 'accessToken' not in tokenResponse:
                raise Exception('Unable to validate App Keys(ClientID/ClientSecret) provided: ' + repr(r.json()))

it adds this string to the authenticator url which I dont understand. Is this the problem? Shouldnt the url end with /v2/token?

1 Answer 1


True should have been a string and not a bool

You must log in to answer this question.

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