Verkäuferforen
Anmelden
Anmelden
imgAnmelden
user profile
Seller_ZHBKu4aywF9ak

SP-API Reports Endpoit returns 403 Error

I've build this app to retrieve data for our internal reports. The app has all roles and permissions assigned to it. Nevertheless, I can access all SP-API endpoints except for the most important one: Reports.

They all return an 403 erros: [{'code': 'Unauthorized', 'message': 'Access to the resource is forbidden', 'details': ''}]

Sample Request (using python requests module)

url = 'https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports'

headers = {

# 'host': 'https://sellingpartnerapi-na.amazon.com',

'user-agent': f'{AppId}/{AppVersion} (Language={LanguageName}/{LanguageVersion})',

'x-amz-access-token': atoken,

'x-amz-date': f'{datetime.datetime.now().strftime("%Y%m%dT%H%M%SZ")}'

}

payload = {

"reportOptions": {

"reportPeriod": "DAY",

"asinGranularity": "SKU"

},

"reportType": "GET_SALES_AND_TRAFFIC_REPORT",

"dataStartTime": f"{dataStartTime}",

"dataEndTime": f"{dataEndTime}",

"marketplaceIds": [

"ATVPDKIKX0DER"

]

}

r = requests.post(url, json=payload, headers=headers)

What am I missing here?

39 Aufrufe
1 Antwort
Tags:Berichterstattung
00
Antworten
user profile
Seller_ZHBKu4aywF9ak

SP-API Reports Endpoit returns 403 Error

I've build this app to retrieve data for our internal reports. The app has all roles and permissions assigned to it. Nevertheless, I can access all SP-API endpoints except for the most important one: Reports.

They all return an 403 erros: [{'code': 'Unauthorized', 'message': 'Access to the resource is forbidden', 'details': ''}]

Sample Request (using python requests module)

url = 'https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports'

headers = {

# 'host': 'https://sellingpartnerapi-na.amazon.com',

'user-agent': f'{AppId}/{AppVersion} (Language={LanguageName}/{LanguageVersion})',

'x-amz-access-token': atoken,

'x-amz-date': f'{datetime.datetime.now().strftime("%Y%m%dT%H%M%SZ")}'

}

payload = {

"reportOptions": {

"reportPeriod": "DAY",

"asinGranularity": "SKU"

},

"reportType": "GET_SALES_AND_TRAFFIC_REPORT",

"dataStartTime": f"{dataStartTime}",

"dataEndTime": f"{dataEndTime}",

"marketplaceIds": [

"ATVPDKIKX0DER"

]

}

r = requests.post(url, json=payload, headers=headers)

What am I missing here?

Tags:Berichterstattung
00
39 Aufrufe
1 Antwort
Antworten
1 Antwort
user profile
Quincy_Amazon
In Antwort auf: Post von: Seller_ZHBKu4aywF9ak

Hello @Seller_ZHBKu4aywF9ak

Thank you for posting your inquiry to the Forums.

While I am not able to answer your question, I would suggest opening a case with Developer Support for additional guidance.

Regards,

Quincy_Amazon

00
Folgen Sie dieser Diskussion, um über neue Aktivitäten benachrichtigt zu werden
user profile
Seller_ZHBKu4aywF9ak

SP-API Reports Endpoit returns 403 Error

I've build this app to retrieve data for our internal reports. The app has all roles and permissions assigned to it. Nevertheless, I can access all SP-API endpoints except for the most important one: Reports.

They all return an 403 erros: [{'code': 'Unauthorized', 'message': 'Access to the resource is forbidden', 'details': ''}]

Sample Request (using python requests module)

url = 'https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports'

headers = {

# 'host': 'https://sellingpartnerapi-na.amazon.com',

'user-agent': f'{AppId}/{AppVersion} (Language={LanguageName}/{LanguageVersion})',

'x-amz-access-token': atoken,

'x-amz-date': f'{datetime.datetime.now().strftime("%Y%m%dT%H%M%SZ")}'

}

payload = {

"reportOptions": {

"reportPeriod": "DAY",

"asinGranularity": "SKU"

},

"reportType": "GET_SALES_AND_TRAFFIC_REPORT",

"dataStartTime": f"{dataStartTime}",

"dataEndTime": f"{dataEndTime}",

"marketplaceIds": [

"ATVPDKIKX0DER"

]

}

r = requests.post(url, json=payload, headers=headers)

What am I missing here?

39 Aufrufe
1 Antwort
Tags:Berichterstattung
00
Antworten
user profile
Seller_ZHBKu4aywF9ak

SP-API Reports Endpoit returns 403 Error

I've build this app to retrieve data for our internal reports. The app has all roles and permissions assigned to it. Nevertheless, I can access all SP-API endpoints except for the most important one: Reports.

They all return an 403 erros: [{'code': 'Unauthorized', 'message': 'Access to the resource is forbidden', 'details': ''}]

Sample Request (using python requests module)

url = 'https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports'

headers = {

# 'host': 'https://sellingpartnerapi-na.amazon.com',

'user-agent': f'{AppId}/{AppVersion} (Language={LanguageName}/{LanguageVersion})',

'x-amz-access-token': atoken,

'x-amz-date': f'{datetime.datetime.now().strftime("%Y%m%dT%H%M%SZ")}'

}

payload = {

"reportOptions": {

"reportPeriod": "DAY",

"asinGranularity": "SKU"

},

"reportType": "GET_SALES_AND_TRAFFIC_REPORT",

"dataStartTime": f"{dataStartTime}",

"dataEndTime": f"{dataEndTime}",

"marketplaceIds": [

"ATVPDKIKX0DER"

]

}

r = requests.post(url, json=payload, headers=headers)

What am I missing here?

Tags:Berichterstattung
00
39 Aufrufe
1 Antwort
Antworten
user profile

SP-API Reports Endpoit returns 403 Error

von Seller_ZHBKu4aywF9ak

I've build this app to retrieve data for our internal reports. The app has all roles and permissions assigned to it. Nevertheless, I can access all SP-API endpoints except for the most important one: Reports.

They all return an 403 erros: [{'code': 'Unauthorized', 'message': 'Access to the resource is forbidden', 'details': ''}]

Sample Request (using python requests module)

url = 'https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports'

headers = {

# 'host': 'https://sellingpartnerapi-na.amazon.com',

'user-agent': f'{AppId}/{AppVersion} (Language={LanguageName}/{LanguageVersion})',

'x-amz-access-token': atoken,

'x-amz-date': f'{datetime.datetime.now().strftime("%Y%m%dT%H%M%SZ")}'

}

payload = {

"reportOptions": {

"reportPeriod": "DAY",

"asinGranularity": "SKU"

},

"reportType": "GET_SALES_AND_TRAFFIC_REPORT",

"dataStartTime": f"{dataStartTime}",

"dataEndTime": f"{dataEndTime}",

"marketplaceIds": [

"ATVPDKIKX0DER"

]

}

r = requests.post(url, json=payload, headers=headers)

What am I missing here?

Tags:Berichterstattung
00
39 Aufrufe
1 Antwort
Antworten
1 Antwort
1 Antwort
Schnellfilter
Sortieren nach
user profile
Quincy_Amazon
In Antwort auf: Post von: Seller_ZHBKu4aywF9ak

Hello @Seller_ZHBKu4aywF9ak

Thank you for posting your inquiry to the Forums.

While I am not able to answer your question, I would suggest opening a case with Developer Support for additional guidance.

Regards,

Quincy_Amazon

00
Folgen Sie dieser Diskussion, um über neue Aktivitäten benachrichtigt zu werden
user profile
Quincy_Amazon
In Antwort auf: Post von: Seller_ZHBKu4aywF9ak

Hello @Seller_ZHBKu4aywF9ak

Thank you for posting your inquiry to the Forums.

While I am not able to answer your question, I would suggest opening a case with Developer Support for additional guidance.

Regards,

Quincy_Amazon

00
user profile
Quincy_Amazon
In Antwort auf: Post von: Seller_ZHBKu4aywF9ak

Hello @Seller_ZHBKu4aywF9ak

Thank you for posting your inquiry to the Forums.

While I am not able to answer your question, I would suggest opening a case with Developer Support for additional guidance.

Regards,

Quincy_Amazon

00
Antworten
Folgen Sie dieser Diskussion, um über neue Aktivitäten benachrichtigt zu werden