Bra*_*don 7 shopify oauth-2.0 meteor
我已经在OAuth的第1步中检索了授权代码而没有任何问题,但是对于我的生活,我无法完成一个帖子来获取访问令牌.我总是得到同样的错误:
content: "{"error":"invalid_request","error_description":"Could not find Shopify API appli... (length: 103)"
这是我的代码看起来像... Meteor.http.post是一个标准的发布请求.我没有运气就尝试过各种各样的组合.我正在开发localhost:
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;
});
Run Code Online (Sandbox Code Playgroud)
Meteor.post是此处记录的标准服务器端发布请求.我尝试过params(比如Node Wrapper),一个数组(比如PHP)和其他东西的组合.我不知道.
是因为我正在开发localhost,而服务器调用现在需要https吗?我的帖子数据结构错了吗?
我做错了什么其他的想法?
我知道您说过您尝试过参数,但是将参数作为数据放入这样的数据中是行不通的。尝试这个..
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;
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1321 次 |
| 最近记录: |