【问题标题】:LightSpeed Retail API -How to get the Temporary TokenLightSpeed Retail API - 如何获取临时令牌
【发布时间】:2018-09-13 08:35:40
【问题描述】:

我正在开发一个 wordpress 插件,它可以从 Lightspeed Retail API 获取某些产品信息。我按照这里文档中的步骤进行操作http://developers.lightspeedhq.com/retail/authentication/access-token/

我有 Client ID 和 Client Secret,但我没有 Temporary Token,我被困在这一点上,我确定我在这里遗漏了一些程序,你能帮我吗?

这是我根据 API 文档使用的当前代码:

...

    $tokenURL = "https://cloud.lightspeedapp.com/oauth/access_token.php";
    $postFields = [
        'client_id' => 'XXXXXXXXXXXXX',
        'client_secret' => 'XXXXXXXXXXXXX',
        'code' => 'Temporary Token',
        'grant_type' => 'authorization_code'
    ];
...

【问题讨论】:

    标签: api oauth-2.0 lightspeed


    【解决方案1】:

    如果您关注instructions here,则会返回临时令牌。

    您需要开始使用此网址:

    https://cloud.lightspeedapp.com/oauth/authorize.php?response_type=code&client_id={client_id}&scope={scope}&state={state}
    

    它将在您的应用被代码/临时令牌接受后返回。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-11
      • 2017-02-14
      相关资源
      最近更新 更多