Comments (1)
@wilminkj although we haven't published a Jupyter notebook example specifically, we have some OAuth samples that should help i.e., here, here, and here. Long story short, for a local app you should register a Native app and use https://login.live.com/oauth20_desktop.srf as the redirect URI. If you are using the Bing Ads Python SDK just use an OAuthDesktopMobileAuthCodeGrant instance and formatting of the scope, redirect_uri, etc should be taken care of. With a localhost web notebook then you could alternatively register https://localhost:portnumber and use the application ID (client_id) and password (client_secret) with the OAuthWebAuthCodeGrant instance.
We will also update this page to link to the samples. This Authentication with OAuth guide describes the grant flow details, and we should at least link to the quick start. :)
Also for more visibility if you share your Jupyter repro steps in the API forum, I'm happy to continue the conversation there.
I did get this example working in a Jupyter notebook.
- Install the SDK:
import sys
!{sys.executable} -m pip install --upgrade --no-cache-dir bingads
-
Add the sample code from here with your client_id (Application Id) and DeveloperToken (for production or sandbox).
Optionally you can include logging to output traffic, for example the SOAP request and response.
import logging logging.basicConfig(level=logging.INFO) logging.getLogger('suds.client').setLevel(logging.DEBUG) logging.getLogger('suds.transport.http').setLevel(logging.DEBUG)
-
Click Run, and you'll be prompted for consent of your app to manage your Bing Ads accounts. Copy the result URL with code=xyz back into your notebook and press 'Enter'.
By default the refresh.txt file is stored in your local directory by default so please be sure to store it securely.
I hope this helps!
from advertising-docs.
Related Issues (20)
- Worst docs ever HOT 1
- How to use Sandbox in an environment like Jenkins HOT 1
- PowerShell script not working HOT 1
- Error: There was an error while trying to deserialize parameter. Bing Ads API V13 Python. HOT 3
- authenticating from serverless-worker system HOT 1
- How to include transaction.xsd and common_types.xsd when validate the xml? HOT 2
- Authentication failed on AddCampaigns HOT 3
- Bing Ads API - PHP
- CampaignPerformanceReport's mutually exclusive Impression Share Performance Statistics out-of-date (Bing Reports Overview Page) HOT 3
- Error on grant consent when following steps in document HOT 5
- Duplicate Report Column - cause error HOT 1
- Feedback: More examples HOT 3
- Missing download for enum values like currencies and minimum CPCs HOT 1
- Please provide direct download links, not just via the API HOT 1
- Getting Error code HOT 5
- 404 Script Error HOT 2
- Option 2 - How long should the access be valid for? HOT 1
- Script execution completed successfully, but it didn't. HOT 9
- Permissions HOT 1
- Negative Keywords report HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advertising-docs.