管理多个客户的API最佳实践 [英] API Best Practice for managing multiple customers

查看:90
本文介绍了管理多个客户的API最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为多个客户开发一个bing广告应用程序,每个客户管理多个帐户,我需要使用Bing Ads API(最好是在python中)。这里的API身份验证的最佳做法是什么?我应该为每个客户创建一个单独的客户端应用程序
,并为每个客户单独授权吗?通过查看文档  此处,对于客户
管理似乎有一种更简单的方法,但我不确定如何?有人可以提供一些指导吗?提前致谢!



杨晓云

I am developing a bing ads application for multiple customers that each manages multiple accounts, and I need to use Bing Ads API (preferably in python). What is the best practice for the API authentication here? Should I create a separate client application for each customer, and authorize individually for each customer? By looking at the docs here, it seems there's an easier way for the customers management, but I am not sure how? Could some one provide some guidance? Thanks in advance!


Xiaoyun Yang

推荐答案

嗨杨晓云,

由于多个用户将进行身份验证,因此您需要请求
通用开发人员令牌
。每个文档:" 你可以请求API访问时请求令牌类型,或稍后通过
升级
Bing Ads Developer Portal 。有关请求开发人员令牌的
的信息,请参阅 
使用Bing Ads API入门 。"

Since multiple users will authenticate, you'll need to request a universal developer token. Per docs: "You can request the token type when requesting API access, or upgrade at a later date through the Bing Ads Developer Portal. For information on requesting a developer token, see Get Started With the Bing Ads API."

你只需
注册
一个应用程序,即通过OAuth使用应用程序ID作为客户端ID。请务必安全地存储每个用户的刷新令牌。 

You only need to register one application i.e., use the app ID as the client ID via OAuth. Be sure to store each user's refresh token securely. 

如果您有任何后续问题或疑虑,请与我们联系。

Please let me know if you have any follow up questions or concerns.

祝你好运,

Eric


这篇关于管理多个客户的API最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆