singer-io / tap-exacttarget

A Singer.io tap for extracting data from the ExactTarget/Salesforce Marketing Cloud API.
GNU Affero General Public License v3.0
14 stars 33 forks source link

Marketing Cloud login fails #35

Open luisgonzalez-mth opened 5 years ago

luisgonzalez-mth commented 5 years ago

Issue seems to be related to https://github.com/singer-io/tap-exacttarget/issues/22 but I cannot create a Marketing Cloud Integration even after specifying the optional Tenant Subdomain. The error returned is "This integration is not eligible to use the legacy /v1/requestToken endpoint because the integration uses enhanced OAuth 2.0 functionality. To obtain a token for this integration, use the applicable Marketing Cloud OAuth 2.0 endpoint for authentication. For a web or public app, use /v2/authorize and then /v2/token. For a server-to-server integration, use /v2/token." Help! There is not anything else I can configure on the integration settings to try to get this to work. Is it something in the code?

Full error message: main - INFO Running tap-exacttarget version 1.3.0 and target-stitch version 1.8.1 main - INFO Starting tap to discover schemas: tap-env/bin/tap-exacttarget --config /tmp/tap_discover_config.json --discover tap - INFO Starting discovery. tap - INFO Generating auth stub... tap - CRITICAL Unable to validate App Keys(ClientID/ClientSecret) provided: {'documentation': '', 'errorcode': 10007, 'message': 'This integration is not eligible to use the legacy /v1/requestToken endpoint because the integration uses enhanced OAuth 2.0 functionality. To obtain a token for this integration, use the applicable Marketing Cloud OAuth 2.0 endpoint for authentication. For a web or public app, use /v2/authorize and then /v2/token. For a server-to-server integration, use /v2/token.'} tap - Traceback (most recent call last): tap - File "tap-env/bin/tap-exacttarget", line 10, in tap - sys.exit(main()) tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/singer/utils.py", line 229, in wrapped tap - return fnc(*args, **kwargs) tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_exacttarget/init.py", line 154, in main tap - do_discover(args) tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_exacttarget/init.py", line 59, in do_discover tap - auth_stub = get_auth_stub(config) tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_exacttarget/client.py", line 47, in get_auth_stub tap - auth_stub = FuelSDK.ET_Client(params=params) tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/FuelSDK/client.py", line 134, in init tap - self.refresh_token() tap - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/FuelSDK/client.py", line 214, in refresh_token tap - raise Exception('Unable to validate App Keys(ClientID/ClientSecret) provided: ' + repr(r.json())) tap - Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {'documentation': '', 'errorcode': 10007, 'message': 'This integration is not eligible to use the legacy /v1/requestToken endpoint because the integration uses enhanced OAuth 2.0 functionality. To obtain a token for this integration, use the applicable Marketing Cloud OAuth 2.0 endpoint for authentication. For a web or public app, use /v2/authorize and then /v2/token. For a server-to-server integration, use /v2/token.'} main - INFO Tap exited abnormally with status 1 main - INFO Exit status is: Discovery failed with code 1 and error message: "Unable to validate App Keys(ClientID/ClientSecret) provided: {'documentation': '', 'errorcode': 10007, 'message': 'This integration is not eligible to use the legacy /v1/requestToken endpoint because the integration uses enhanced OAuth 2.0 functionality. To obtain a token for this integration, use the applicable Marketing Cloud OAuth 2.0 endpoint for authentication. For a web or public app, use /v2/authorize and then /v2/token. For a server-to-server integration, use /v2/token.'}".

israelmendez232 commented 5 years ago

Just to reinforce it that I'm having the same problem :(

luisgonzalez-mth commented 5 years ago

Please note that I was finally able to resolve this issue by creating a new package in Marketing Cloud, this time making sure to uncheck the box for "Create with enhanced functionality"!

l3rady commented 4 years ago

I was having this issue too and was able to get past this error by unticking the enhanced functionality. However, from 1st August 2019 Exact Target will no longer support new apps being created using the legacy API and will be forced to use v2 with OAuth.

Any plans on updating this tap to support ET's v2 api?

svjohns commented 4 years ago

Adding a "me too" here, I'm getting around it by using the legacy authentication for now also.

tigerjz32 commented 4 years ago

I started a conversation in Slack channel with @KAllan357 but this will always be an issue now for any integration after Aug 1, 2019. Before there was a workaround by using v1 in SFMC installed packages but that isn't an option anymore.

https://help.salesforce.com/articleView?id=mc_rn_january_2019_platform_ip_remove_legacy_package_create_ability.htm&type=5

tarasevicius commented 4 years ago

Any updates on this?

jmtorres commented 4 years ago

@tigerjz32 @KAllan357 I just submitted a pull request #40 that will hopefully get this on the right track. I don't have any legacy keys I can use in our account, so I need this to be able to sync.

tigerjz32 commented 4 years ago

@jmtorres thank you! Do we know when this'll get merged?

vitoriacalil commented 4 years ago

Facing the same issue!

jesuejunior commented 4 years ago

Hi there, any workaround ?

rutaylor commented 4 years ago

Is this still an open issue? I tried setting this up today and I am getting the same authentication error regarding the use of V1 rather than V2

ManishaKorala commented 3 years ago

Using FuelSDK-Python Version 1.2.0 I am having an authorized error on using the v1/requestToken.

Here is my code:

import os

os.environ["FUELSDK_CLIENT_ID"] = "xxx" os.environ["FUELSDK_CLIENT_SECRET"] = "xxx" os.environ["FUELSDK_APP_SIGNATURE"] = "None" os.environ["FUELSDK_DEFAULT_WSDL"] = "https://webservice.exacttarget.com/etframework.wsdl" os.environ["FUELSDK_BASE_API_URL"] = "https://www.exacttargetapis.com" os.environ["FUELSDK_AUTH_URL"] = "https://auth.exacttargetapis.com/v1/requestToken" os.environ["FUELSDK_SOAP_ENDPOINT"] = "https://webservice.exacttarget.com/Service.asmx" os.environ["FUELSDK_WSDL_FILE_LOCAL_LOC"] = "/Users/.../ExactTargetWSDL.s6.xml"

import FuelSDK

myClient = FuelSDK.ET_Client() list = FuelSDK.ET_List() list.auth_stub = myClient response = list.get()

print('Post Status: ' + str(response.status)) print('Code: ' + str(response.code)) print('Message: ' + str(response.message)) print('Result Count: ' + str(len(response.results))) print('Results: ' + str(response.results))

Error:


    raise Exception('Unable to validate App Keys(ClientID/ClientSecret) provided: ' + repr(r.json()))
Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {'message': 'Unauthorized', 'errorcode': 1, 'documentation': ''}