MicrosoftDocs / Advertising-docs

Creative Commons Attribution 4.0 International
15 stars 59 forks source link

Bing Ads API - PHP #1072

Open jatuAbdullah opened 2 years ago

jatuAbdullah commented 2 years ago

D:\xampp\htdocs\bingAds2\vendor\microsoft\bingads\samples\V13>php ProductAds.php You need to provide consent for the application to access your Microsoft Advertising accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Microsoft Advertising account:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=https://ads.microsoft.com%2Fmsads.manage+offline_access&client_id=0a460095-c486-4d39-9483-d347fedc6cbf&response_type=code&redirect_uri=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fnativeclient

After you have granted consent in the web browser for the application to access your Microsoft Advertising accounts, please enter the response URI that includes the authorization 'code' parameter:

https://login.microsoftonline.com/common/oauth2/nativeclient?code=M.R3_BAY.71623abb-c150-8863-a3b2-2b9396350587

Error: invalid_client Description: AADSTS70002: The provided request must include a 'client_secret' input parameter. Trace ID: fd6ab27d-6483-4ffa-a57b-d01cd2546901 Correlation ID: 75ce4913-64f3-4970-bb68-66bfacbafec6 Timestamp: 2022-06-15 10:45:04Z You need to provide consent for the application to access your Microsoft Advertising accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Microsoft Advertising account:

After granting access. I am getting _Error: invalidclient - I am developing this API using php on my local host for fetching product ads data