Seller Central
Seller Forums

Amazon Seller Forums » Login With Amazon » Login With Amazon Developers

Thread: LWA for Sponsored Products API
This question is not answered.


Permlink Replies: 2 - Pages: 1 - Last Post: 21 Apr, 2017 1:50 PM by: Renat_Ibragimov Threads: [ Previous | Next ]
Renat_Ibragimov

Posts: 2
Registered: 27 Mar, 16 7:07 PM
Posted on: 17 Apr, 2017 3:14 PM  
Click to report abuse...   Click to reply to this thread Reply
Hi Guys,

The main idea is to get PPC campaigns' info with LWA.

PPC guide is by the following link
https://images-na.ssl-images-amazon.com/images/G/01/AdProductsWebsite/downloads/Amazon_Advertising_API_Reference.pdf

I'm trying to get auth Code for my app
with request bellow. I'm using Postman to test API call

https://www.amazon.com/ap/oa?client_id={$client_id}&scope=profile%20*cpc_advertising%3campaign_management*&response_type=code&state={$state}&redirect_uri=https://www.getpostman.com/oauth2/callback

Scope is (encoded) profile%20cpc_advertising%3campaign_management

Here is a response:

https://app.getpostman.com/oauth2/callback?error_description=An+unknown+scope+was+requested&state={$state}&error=invalid_scope

Previously I had registered for API usage here: https://advertising.amazon.com/API#sign_up
But hadn't get any confirmation yet.

Could you please help me with that? What I'm missing?

Thanks

Edited by: Renat Ib on Apr 17, 2017 3:15 PM
Is this a helpful question? Yes 0   No
2 Replies
Sort replies by:
Yancheng G. (LWA)

Posts: 25
Registered: 17 Jun, 14 4:37 PM
Posted on: 21 Apr, 2017 11:30 AM   in response to: Renat_Ibragimov in response to: Renat_Ibragimov  
Click to report abuse...   Click to reply to this thread Reply
Hello,

The error you got indicates that you have an invalid scope in your quest.

The decoded scope value in your email is: profile cpc_advertising<ampaign_management

The correct scope value should be: profile cpc_advertising:campaign_management
The correct scope value after URL encoding: profile%20cpc_advertising%3acampaign_management

Thank you
Was this reply helpful? Yes 0   No 0
Renat_Ibragimov

Posts: 2
Registered: 27 Mar, 16 7:07 PM
Posted on: 21 Apr, 2017 1:47 PM   in response to: Yancheng G. (LWA) in response to: Yancheng G. (LWA)  
Click to report abuse...   Click to reply to this thread Reply
Hi Yancheng G (LWA),

Thank you for your answer, it was helpful.

Updated request params to the following, as you recommended, Please find examples bellow

Non URL encoded: profile cpc_advertising:campaign_management
URL Encoded: profile%20cpc_advertising%3acampaign_management

Unfortunately I'm receiving the same error:

https://app.getpostman.com/oauth2/callback?error_description=An+unknown+scope+was+requested&state={state}&error=invalid_scope

Could you please help me to found out what I'm doing wrong?

Thank you in advance,
Renat

Edited by: Renat_Ibragimov on Apr 21, 2017 1:48 PM
Was this reply helpful? Yes 0   No 0