Support Amazon DSP API - Reports entity#57
Conversation
|
Hi Denis, thanks for extend the package and support the DSP reports, would like to check if further release we could pack the access_token_client, client and credential_provider of the specific DSP requirements in the auth and base folder to keep the core of the api inside of that folders. |
|
@denisneuf, thank you for a quick review and release! Yes, I also thought about making specific DSP requirements more generic, but wanted to reduce the risk of accidentally breaking other functionality because of the learning curve on this project. But will be happy to review your changes when you have time to implement them. |
|
@twistedFantasy did you try to use the regular credential provider that includes the profile_id ? Do it get you an error if you use the regular client? |
|
Hi Denis, I am afraid that I made some changes in the Credential Provider and surely will affect your DSP reports in v0.4.4, Maybe you could check?
As far as I see the main difference is that the DSP endpoint only need:
'User-Agent': self.user_agent,
'Amazon-Advertising-API-ClientId': self.credentials.client_id,
'Authorization': 'Bearer %s' % self.auth.access_token,
'Content-Type': 'application/json',
That headers while the “regular” api’s use:
'User-Agent': self.user_agent,
'Amazon-Advertising-API-ClientId': self.credentials['client_id'],
'Authorization': 'Bearer %s' % self.auth.access_token,
'Amazon-Advertising-API-Scope': self.credentials['profile_id'],
'Content-Type': 'application/json'
So DSP do not use the Amazon-Advertising-API-Scope and use a parameter for the path called accountId, is that right?
… El 7 jul 2022, a las 1:56, Denis Sventitsky ***@***.***> escribió:
@denisneuf <https://github.com/denisneuf>, thank you for a quick review and release! Yes, I also thought about making specific DSP requirements more generic, but wanted to reduce the risk of accidentally breaking other functionality because of the learning curve on this project. But will be happy to review your changes when you have time to implement them.
—
Reply to this email directly, view it on GitHub <#57 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD4ENUVZNSOKY2YMUHN2OHDVSXCGBANCNFSM52WLYLSA>.
You are receiving this because you were mentioned.
|
Initial discussion about this future pull request can be found here
Amazon DSP official documentation can be found here
DSP Reports Swagger API implemented in the scope of this pull request can be found here
Main difference between core Amazon advertising API and DSP is that DSP doesn't use
profile_idparam which is a required param for most of the other API requests. Also specialAcceptheader should be passed for DSP Report API requests otherwiseNot Acceptableerror message will be returned. I also removedCredentialProviderfromad_api/base/config.pyas it isn't used anywhere and maybe you forgot to delete it during migration to the new version ofCredentialProviderlocated atad_api/base/credential_provider.py. Will be happy to hear your feedback and fix anything which does not comply with the design convention of this project.