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
已提問 1 年前檢視次數 337 次
1 個回答
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
已回答 10 個月前
profile pictureAWS
專家
已審閱 10 個月前

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

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南