I have a Google Appsscript code using oAuth2 to connect to Bing Ads API.
It goes like:
OAuth2.createService(connector.OAUTH.serviceName)
.setAuthorizationBaseUrl(connector.OAUTH.authorizationURL)
.setTokenUrl(connector.OAUTH.tokenURL)
.setClientId(connector.OAUTH.clientId)
.setClientSecret(connector.OAUTH.clientSecret)
.setPropertyStore(PropertiesService.getUserProperties())
.setScope('bingads.manage')
.setCallbackFunction('authCallback');
If I use one of my old bing dev applications (I believe API v1), oAuth2 works fine, however, when I use a newly created application (and add the callback URL), I am getting unauthorized_client
error.
I couldn't find a change reference between the versions, so not sure what I am doing wrong
Apparently, my application was somehow flawed. Instead of changing the code, I recreated the application, and it now works.