0

我正在尝试获取 Shop detais 以及我必须将脚本标签放入商店。

遵循我构建的所有标准 API 调用:

scope = ["write_products", "read_orders"]
shopify.Session.setup(api_key='somekey', secret='somekeyagain')
permission_url = shopify.Session.create_permission_url(shop_url, scope)
params = { 'code' : request.REQUEST.get('code'),'timestamp' :request.REQUEST.get('timestamp'),'signature':request.REQUEST.get('signature')}
session = shopify.Session(shop_url, params)

我通过这个电话得到的只是这个错误:

ValidationException at /login/finalize/
Invalid Signature: Possibly malicious login
Request Method: GET
Request URL:    http://127.0.0.1:8000/login/finalize/?code=somecode&shop=myshop.myshopify.com&timestamp=1368003682&signature=somesignature
Django Version: 1.5.1
Exception Type: ValidationException
Exception Value:    
Invalid Signature: Possibly malicious login
4

1 回答 1

0

这是因为您的签名无效。签名=一些签名。如果您查看源代码,您将看到它是如何检查的。md5(cls.secret + sorted_pa​​rams).hexdigest() == 签名

于 2013-05-08T10:32:02.087 回答