Share via

Keyword planner api fromBing Ads API

Anonymous
2019-05-02T13:11:18+00:00

Hello Team,

As I am using Library for Bing ads api  for getting keyword ideas and traffic estimates.

I had followed these steps -

  1. Created microsoft account 
  2. Create a app registrartion, so get Client ID

Now I am running keywordplanner.php (https://docs.microsoft.com/en-us/bingads/guides/code-example-keyword-planner?view=bingads-12)

But I am getting this error ---

You need to provide consent for the application to access your Bing Ads Bing Ads accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Bing Ads account: https://login.live-int.com/oauth20\_authorize.srf?scope=bingads.manage&prompt=login&client\_id=5169f4fe-a545-403a-b6a8-210867f13f40&response\_type=code&redirect\_uri=https://login.live-int.com/oauth20\_desktop.srf After you have granted consent in the web browser for the application to access your Bing Ads accounts, please enter the response URI that includes the authorization 'code' parameter: 

Notice: Use of undefined constant STDIN - assumed 'STDIN' in C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php on line 206

Warning: fgets() expects parameter 1 to be resource, string given in C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php on line 206

0 The ResponseUri is not set. #0 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(209): Microsoft\BingAds\Auth\OAuthWithAuthorizationCode->RequestOAuthTokensByResponseUri('') #1 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(186): Microsoft\BingAds\Samples\V13\AuthHelper::RequestUserConsent() #2 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(79): Microsoft\BingAds\Samples\V13\AuthHelper::AuthenticateWithOAuth() #3 C:\xampp\htdocs\BingAds-PHP-SDK-master\KeywordPlanner.php(64): Microsoft\BingAds\Samples\V13\AuthHelper::Authenticate() #4 {main}

I had followed the above instruction and run this URL (https://login.live-int.com/oauth20\_authorize.srf?scope=bingads.manage&prompt=login&client\_id=5169f4fe-a545-403a-b6a8-210867f13f40&response\_type=code&redirect\_uri=https://login.live-int.com/oauth20\_desktop.srf) in browser.

But I am getting --

We're unable to complete your request

unauthorized_client: The client does not exist. If you are the application developer, configure a new application through the application management site at https://apps.dev.microsoft.com/.

Please suggest me on urgent basis. As i am using sandbox (testing)

Microsoft Advertising | Manage ads | Get started

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2019-05-02T21:01:00+00:00

    Hello Team,

    As I am using Library for Bing ads api  for getting keyword ideas and traffic estimates.

    I had followed these steps -

    1. Created microsoft account 
    2. Create a app registrartion, so get Client ID

    Now I am running keywordplanner.php (https://docs.microsoft.com/en-us/bingads/guides/code-example-keyword-planner?view=bingads-12)

    But I am getting this error ---

    You need to provide consent for the application to access your Bing Ads Bing Ads accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Bing Ads account: https://login.live-int.com/oauth20\_authorize.srf?scope=bingads.manage&prompt=login&client\_id=5169f4fe-a545-403a-b6a8-210867f13f40&response\_type=code&redirect\_uri=https://login.live-int.com/oauth20\_desktop.srf After you have granted consent in the web browser for the application to access your Bing Ads accounts, please enter the response URI that includes the authorization 'code' parameter: 

    Notice: Use of undefined constant STDIN - assumed 'STDIN' in C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php on line 206

    Warning: fgets() expects parameter 1 to be resource, string given in C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php on line 206

    0 The ResponseUri is not set. #0 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(209): Microsoft\BingAds\Auth\OAuthWithAuthorizationCode->RequestOAuthTokensByResponseUri('') #1 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(186): Microsoft\BingAds\Samples\V13\AuthHelper::RequestUserConsent() #2 C:\xampp\htdocs\BingAds-PHP-SDK-master\AuthHelper.php(79): Microsoft\BingAds\Samples\V13\AuthHelper::AuthenticateWithOAuth() #3 C:\xampp\htdocs\BingAds-PHP-SDK-master\KeywordPlanner.php(64): Microsoft\BingAds\Samples\V13\AuthHelper::Authenticate() #4 {main}

    I had followed the above instruction and run this URL (https://login.live-int.com/oauth20\_authorize.srf?scope=bingads.manage&prompt=login&client\_id=5169f4fe-a545-403a-b6a8-210867f13f40&response\_type=code&redirect\_uri=https://login.live-int.com/oauth20\_desktop.srf) in browser.

    But I am getting --

    We're unable to complete your request

    unauthorized_client: The client does not exist. If you are the application developer, configure a new application through the application management site at https://apps.dev.microsoft.com/.

    Please suggest me on urgent basis. As i am using sandbox (testing)

    Hi AmirSyed1,

    Thank you for contacting Microsoft Advertising Support about this issue as we are always happy to help!

    Since this is an API question that requires assistance from support with more experience on API. We highly suggest using our forum that is designed to answer questions about API. The following link provided will direct you to our API forum – Microsoft Advertising API Forum

    However, I did take some time to search if this question was already asked and found a forum link that may answer your question.

    I hope this information is helpful! Please let me know if you have any other questions or concerns.

    Thank you for choosing Microsoft Advertising!

    Sincerely,

    Was this answer helpful?

    0 comments No comments

0 additional answers

Sort by: Most helpful