Exchanging x-amzn-marketplace-token for customer-id


I am trying to get a token that has been posted to my application from AWS Marketplace. It is NOT working. Using the debugger I can see that the token from AWS is blank. Once I will get the token, I will be able to resolve the customer. Why we haven't received X-Amz-Security-Token under header.

As a consequence of this omission, users encounter difficulties in completing the AWS marketplace product onboarding process. Kindly provide guidance or assistance in resolving this particular issue

Please find the product details below


Code snippet below

Import AWS Python SDK and urllib.parse

import boto3 import urllib.parse as urlparse

Resolving Customer Registration Token

formFields = urlparse.parse_qs(postBody) regToken = formFields['x-amzn-marketplace-token']

If regToken present in POST request, exchange for customerID

if regToken: marketplaceClient = boto3.client("meteringmarketplace") customerData = marketplaceClient.resolve_customer(RegistrationToken=regToken) print(customerData) customer = { "CustomerIdentifier": customerData["CustomerIdentifier"], "ProductCode": customerData["ProductCode"], }

已提問 1 年前檢視次數 337 次
1 個回答

Greetings from AWS Marketplace,

Since this is a custom integration we are unable to assist with inquires related to your API integration. We were able to confirm that following the code snippets from our Seller Guide are correct and work as expected.

If you continue to experience issues with your API integration, we suggest using our SaaS Quick Start, this will allow you to do the integration and get your product published while you still work on your custom integration.

Regards, AWS Marketplace Seller Support

profile pictureAWS
已回答 10 個月前
profile pictureAWS
已審閱 10 個月前

您尚未登入。 登入 去張貼答案。