我正在开发一个wordpress插件,它从Lightspeed Retail API获取特定的产品信息。我按照这里的文档中的步骤操作http://developers.lightspeedhq.com/retail/authentication/access-token/
我有客户ID和客户密码,但我没有临时令牌,我被困在这一点上,我确定我错过了一些程序,你能帮我吗?
这是我根据API文档使用的当前代码:
...
$tokenURL = "https://cloud.lightspeedapp.com/oauth/access_token.php";
$postFields = [
'client_id' => 'XXXXXXXXXXXXX',
'client_secret' => 'XXXXXXXXXXXXX',
'code' => 'Temporary Token',
'grant_type' => 'authorization_code'
];
...发布于 2019-01-23 21:12:41
如果您遵循instructions here,则返回临时令牌。
您需要开始使用此URL:
https://cloud.lightspeedapp.com/oauth/authorize.php?response_type=code&client_id={client_id}&scope={scope}&state={state}它将在您的应用程序通过代码/临时令牌接受后返回。
https://stackoverflow.com/questions/49639869
复制相似问题