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

0

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

https://aws.amazon.com/marketplace/pp/prodview-ah2x3x7tzls3y

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"], }

Niraj
asked 10 months ago309 views
1 Answer
0

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
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions