I'm trying to authenticate with the Bing Ads API. I believe I've gotten the OAuth 2.0 flow working correctly, but I'm trying to make my first request following this documentation to their SOAP API. Here's the PowerShell code I'm referencing from those docs:
$accessToken = "AccessTokenGoesHere";
$developerToken = "DeveloperTokenGoesHere";
[xml]$getUserRequest =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v13="https://bingads.microsoft.com/Customer/v13">
<soapenv:Header>
<v13:DeveloperToken>{0}</v13:DeveloperToken>
<v13:AuthenticationToken>{1}</v13:AuthenticationToken>
</soapenv:Header>
<soapenv:Body>
<v13:GetUserRequest>
<v13:UserId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</v13:GetUserRequest>
</soapenv:Body>
</soapenv:Envelope>' -f $developerToken, $accessToken
$headers = @{"SOAPAction" = "GetUser"}
$uri = "https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc"
$response = Invoke-WebRequest $uri -Method post -ContentType 'text/xml' -Body $getUserRequest -Headers $headers
Write-Output $response.Content
As you can see, they require that you pass the access token into the request body. I know that retool has OAUTH2_TOKEN magic strings, but can they be used in the body of the request (I've tested doing this but might be missing something)? If so how would I do that, and if not, what would you suggest?