简体   繁体   English

我想连接我的 sp-api 亚马逊卖家和 django

[英]i want connect my sp-api amazon seller and django

hey i try to fix this code for amazon seller sp-api and it's not work at all cannot connect嘿,我尝试为亚马逊卖家 sp-api 修复此代码,但它根本不起作用,无法连接

def amazon_list(request):
    #api_request = requests.get('https://jsonplaceholder.typicode.com/todos/1')
    #api = json.loads(api_request.content)
    #return render(request, 'shop/api.html', {'api': api})

    header = {
            'refresh_token':'Atzr|IwEBIO5ZRMBu6h3**********',
            'lwa_client_id':'amzn1.sp.solution.cb762*********3',
            'lwa_client_secret':'c99d6d067388d00c7be64150************',
            'aws_access_key':'kiDJ9rM+zBdbWmSLF**********',
            'aws_secret_key':'AKIAR4KA65F7DWCNKMZL',
            'role_arn':'arn:aws:iam::**********:user/SellingPartnerAPI',
    }

    res = Orders(credentials=header, marketplace='A2EUQ1WTGCTBG2')
    resultat = convert_response_to_amazon_order_list(
                    res.get_orders(CreatedAfter='2022-03-16', CreatedBefore=date.today().isoformat()).payload
                )
    return render(request, 'shop/api.html', {'api': resultat})

my code work fine after configuration of aws and following steps in amazon documentation, it's fixing user and role and policy...and all work fine在配置 aws 并遵循亚马逊文档中的步骤后,我的代码工作正常,它正在修复用户和角色以及策略......并且一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以在没有卖家账户的情况下注册为 Amazon SP-API 的开发人员? - Is it possible to register as a developer for Amazon SP-API without having a seller account? Amazon SP-API 速率限制 - Amazon SP-API Rate Limit Amazon SP-API如何上传feed数据? - Amazon SP-API how to upload the feed data? 通过 Amazon SP-API 对产品发表评论 - Post Review on product through Amazon SP-API 拒绝访问请求的资源 403 SP-API AMAZON - C# - Access to requested resource is denied 403 SP-API AMAZON - C# 亚马逊卖家中心账户 - Amazon Seller Central account 连接 Django Amazon Lightsail Mysql - Connect Django Amazon Lightsail Mysql 我想将 Google Cloud Vision 连接到我的 flutter 应用 - I want connect Google Cloud Vision to my flutter app 如何通过 python-amazon-sp-api 获取评论/评级的产品数量? - How to get product count of reviews/rating by python-amazon-sp-api? 我想连接到 azure 数据块并创建工作区并使用 powershell 命令或 rest api 进行部署。这可能吗? - I want to connect to azure databricks and create workspace and do the deployment using powershell commands or rest api. is it possible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM