Shopify访问令牌会重定向我,而不是给我令牌

问题描述 投票:0回答:1

[当我尝试在shopify中获取我的应用的访问令牌,而不是返回a

{ "access_token": "{{token}}", "scope": "{{scopes}}" },

我得到重定向:

(响应代码:303)

<html><body>You are being <a href="https://{{shop}}.myshopify.com/admin/auth/login">redirected</a>.</body></html>.

我的要求是:

POST

https://{{shop}}.myshopify.com/admin/oath/access_token

正文:

{
"client_id": "{{app_key}}",
"client_secret": "{{app_secret}}",
"code": "{{authorization_code}}"
}

我在这里做错了什么?

oauth shopify access-token shopify-app shopify-api
1个回答
0
投票

猜测您已完成授权,然后再执行此步骤。

https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={access_mode}

此外,IIM猜测花括号中的值已替换为正确的变量:)

© www.soinside.com 2019 - 2024. All rights reserved.