I want to retrieve data from Marketing Cloud Data Extension. Turns out there isn't any REST API for that. Retrieve Data from a Data Extension shows SOAP API can be used but there are no sample for apex. I have used Exact Target Partner WSDL to generate Apex class. Authenticate SOAP API describes the access token approach (fuelouath in header of soap envelope), it works fine with SoapUI. But there is no reference to the same in the generated Apex class.
The question in this link uses fueloauth header.
- What all changes are needed in the auto generated Apex class so as to authenticate using access token in Apex? Snippet from link.
- Any other way to authenticate from existing Apex class.
What all changes are needed in the auto generated Apex class so as to authenticate using access token in Apex? Snippet from link above.
ET_WSDL.Soap soapRequest = new ET_WSDL.Soap();
ET_WSDL.fueloauth header = new ET_WSDL.fueloauth();
header.fueloauth = 'MyAuthtoken';
soapRequest.HeaderFOAuth = header;
Your help is really appreciated. Thanks in advance.