长寿的Shopify代币

发布于 2025-02-03 08:10:50 字数 210 浏览 4 评论 0原文

我们正在研究一个系统,该系统从客户的Shopify商店检索数据,并根据此数据提供一些服务。为了使最终用户尽可能方便,我们想每天\每周\每月更新此数据。 目前,我们只提出了实施未列出应用程序的解决方案,请提示用户为应用程序提供所有必要的权限,以访问其商店并获取数据。但是,我们得到的令牌似乎很长一段时间没有有效,并且我们可能无法在一天后重复使用它。 如果您可以分享实施这种方法的任何成功案例,我们将不胜感激。

We are working on a system which retrieves data from customers' Shopify shops and provides some services based on this data. In order to make it as convenient as possible for an end-user we would like to update this data on a daily\weekly\monthly basis.
For now we only came up with a solution of implementing unlisted app, prompt a user to provide all necessary permissions for the app to access their shops and fetch the data. But the token we get doesn't seem to be valid for a long time and we probably won't be able to reuse it a day later.
We appreciate it if you can share any success cases of implementing this kind of approach.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

西瓜 2025-02-10 08:10:50

您为他们可以使用OAuth安装的商人提供了一个应用程序。当提示商人批准该应用程序时,Shopify将为您的应用提供长期访问令牌,您可以根据需要使用尽可能多的时间。我使用合作伙伴应用仪表板上的自定义应用程序来创建这类一次性应用程序。它优于商人不得不勾选范围和权限IMO的人。

您可以要求和接收两种令牌。考虑到离线访问或长期寿命。它适用于一切。它是针对webhooks的示例,也是其他没有人参与的访问。但是,还有在线访问令牌!说一个人点击Shopify的应用程序进行一些工作。您可以要求在线令牌让他们做自己的事情,而对于24小时的话来说,令牌只有好。

所以您有选择!

You provide an App to the merchant they can install using oAuth. When the merchant is prompted to approve the App, Shopify will then provide your App with a long-lived access token you can use as much as you want, for as long as you want. I use a custom App from my Partner App dashboard to create these kinds of one-off Apps. It is superior to the one where the merchant has to tick off scopes and permissions IMO.

There are two kinds of token you can ask for and receive. One is considered for offline access, or long-lived. It works for everything. It is for webhooks as an example, or other access where no person is involved. But, there is also, online access tokens! Say a person clicks into the App from Shopify to do some work. You can request an online token for them to do their thing, and that token is only good for say 24 hours.

So you have options!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文