A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
Im in the same boat since last week...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Until last Friday I was able to access my Sandbox MsAds account via API (in python).
Now it fails because I need to refresh the credentials and I can't access the login page (it returns a 403 Forbidden):
The Python library gives me this URL:
https://login.windows-ppe.net/consumers/oauth2/v2.0/authorize?client_id=...&scope=https://api.ads.microsoft.com/msads.manage%20offline_access&response_type=code&redirect_uri=....&prompt=login
It gives me a direct error 403, so I can't continue. Should I change something?
I'm using the following library:
Name: bingads
Version: 13.0.14
Thanks in advance!
EDIT: For your information. We think that windows-ppe has been deprecated so we updated the library and tried to use an "outlook" account (instead of an "outlook-int" account), but we still haven't managed to authenticate properly (see replies to Julian Selser's comments).
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
Im in the same boat since last week...
Finally I got it!
I am using the Python library. I had to update to v13.0.26 because older versions required me to keep a deprecated setuptools. So that may be part of the solution.
I used a real "@outlook.com" account to access my sandbox account (you may need to create a new sandbox account if you don't have access).
I had to create a new App Registration in Azure Entra ID, because the relevant part was WHO may access, and you need to select the third option (Under Supported account types, you must select the third option: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).). I did it in our production Azure Entra ID, I just named the App Registration "Sandbox BingAds API" or similar.
Then you will need to create a secret so you use its value in your setup (you know, like before you need the well known token, the client_id you created (the new app registration) and the client secret you just created.
Lucky me, I had access to my sandbox using an outlook account, so I was able to create the tokens and I accessed via API my sandbox system.
I hope that help others.