gpt4 book ai didi

oauth-2.0 - Shopify:获取 OAuth 访问 token 的问题

转载 作者:行者123 更新时间:2023-12-04 12:41:53 25 4
gpt4 key购买 nike

我已经在 OAuth 的第 1 步中毫无问题地检索了授权码,但在我的一生中,我无法完成一篇文章来获取访问 token 。我总是得到同样的错误:
content: "{"error":"invalid_request","error_description":"Could not find Shopify API appli... (length: 103)"
这是我的代码的样子... Meteor.http.post 是一个标准的发布请求。我尝试了各种组合,但没有任何运气。我正在本地主机上开发:

var url = 'https://' + shopName + '/admin/oauth/access_token';    
var data = { client_id: apiKey, client_secret: secret, code: code };

Meteor.http.post(url, data,
function(error, result) {
debugger;
});

Meteor.post 是标准的服务器端发布请求 documented here .我尝试过参数(如 Node Wrapper)、数组(如 PHP)和其他东西的组合。我不知道。

是不是因为我在本地主机上开发并且服务器调用现在需要 https?我的帖子数据结构错了吗?

任何其他想法我做错了什么?

最佳答案

我知道你说过你尝试过 params 但将 params 作为这样的数据放置是行不通的。尝试这个..

var url = 'https://' + shopName + '/admin/oauth/access_token';    
var data = { client_id: apiKey, client_secret: secret, code: code };

Meteor.http.post(url, {params:data},
function(error, result) {
debugger;
});

关于oauth-2.0 - Shopify:获取 OAuth 访问 token 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14367387/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com