Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

OAuth error on SOAP request #178

Open
jmares79 opened this issue Aug 29, 2023 · 1 comment
Open

OAuth error on SOAP request #178

jmares79 opened this issue Aug 29, 2023 · 1 comment
Labels

Comments

@jmares79
Copy link

Hi all, for an internal project I need to perform a Data extract. For that I've been following the SDK docs and trying to connect via SOAP.

The issue is that when trying to authenticate with OAuth FALSE, I receive a message as:

"Unable to validate App Keys(ClientID/ClientSecret) provided.: Unable to validate App Keys(ClientID/ClientSecret) provided, requestToken response:{"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.","errorcode":10007,"documentation":""}"

It looks like, from the issues, only OAuth is valid to authenticate now, but I'm not sure how to obtain a token and, even if I can get one, how to use the token with "ET_Client" SOAP class.

Am I missing some steps? The code I'm using to try to create the client is:
$client = new ET_Client( false, true, array( 'appsignature' => 'none', 'clientid' => <CLIENT_ID>, 'clientsecret' => <CLIENT_SECRET>, 'defaultwsdl' => 'https://webservice.exacttarget.com/etframework.wsdl', 'baseAuthUrl' => '<URL>', 'baseSoapUrl' => '<SOAP_URL>', 'baseUrl' => '<REST_URL>', 'xmlloc' => <path_to_a_downloaded_WSDL>, 'useOAuth2Authentication' => false, 'proxyhost' => <MY_PROXY>, 'proxyport' =><PORT> ) );

Thanks!

@jmares79 jmares79 added the bug label Aug 29, 2023
@garek007
Copy link

I have some working code, but it looks like you are close, and the readme should have some good sample code. Did you try it with the v2 endpoint? One of the things that has tripped me up in the past was the WSDL location. Make sure your path to that is correct. I have downloaded it in the past and modified the path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants