Git Product home page Git Product logo

amazon-advertising-api-php-sdk's People

Contributors

callcolor avatar dbrent-amazon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-advertising-api-php-sdk's Issues

Error getting Refresh token

While going thru the Authorization process, we keep getting an error when trying to retrieve the refresh + access token.

{"error_description":"The request has an invalid grant parameter : code","error":"invalid_grant"}

After being redirected from LwA, we copy the Auth code exactly from the redirect_uri query string into our serversided call with cURL in order to get the refresh token, but we keep getting this error. Any help or suggestions?

Sponsored display list campaign not working in vendor account

Hi,
I hope all are doing well. i have try to get list campaign for vendor account. But, we get empty result. And we get list campaign for seller account using same code. please guide us for to get list campaigns for vendor account. Thanks for your advice.

Get report for a time period, not a single day.

Hi.
Im getting the report with this code snipped. $request = $client->requestReport(
"campaigns",
array(
"reportDate" => "20210815",
// "campaignType" => "sponsoredProducts",
"metrics" => "campaignName,impressions,clicks,cost"
)
);`

Is there any way to get report for a time range, for example last 7 days or last 30 days?
Thank you.

New functions

Any roadmap to update to support all the new functions like get search terms etc?

Update Campaign/AdGroup Issue

Using following example to update the campaign, but always getting 422 in response.
$client->updateCampaigns(
array(
array("campaignId" => 173284463890123,
"name" => "Update Campaign One",
"state" => "enabled",
"dailyBudget" => 10.99
)
)
);

Response

Array
(
[success] =>
[code] => 422
[response] => {"code":"422","requestId":"K07CM5C8BS3W78E1ZBAC"}
[requestId] => K07CM5C8BS3W78E1ZBAC
)

  • Same with update AdGroup

As per Doc this might use PUT request.

Vendors Support?

This isn't really a question about the library directly, but more hoping your experience with the actual API would give you answers.

I am having no problems with seller accounts, but the vendor profiles are not returning results in the API.

To be clear:
i'd expect calls to /profiles to behave exactly the same no matter if the underlying account is vendor or seller.

With seller accounts i'm seeing all profiles, with vendor accounts the profiles are showing empty

{"code":"401","details":"Authentication failed","requestId":"K144VZX9J0CCDG4229C5"}

i have used this amazon-advertising-api-php-sdk api but i got every time one error like Authentication failed.
so please suggest me how to solved that.
here is my code
$code = $_REQUEST['code'];
$postfields = array(
'grant_type'=>'authorization_code',
'code'=>$code,
'client_id'=>client_id,
'client_secret'=>client_secret
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.amazon.com/auth/o2/token');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // On dev server only!
$result = curl_exec($ch);
$newResult= json_decode($result);

    $config = array(
        "clientId" => client_id,
        "clientSecret" => client_secret,
        "region" => "na",
        //"accessToken" => $newResult->access_token,
        "refreshToken" => $newResult->refresh_token,
        "sandbox" => TRUE);

   $client = new Client($config);
   $d=$client->registerProfile(array("countryCode" => "US"));
        print_r($d);

Where to run the authorization URL to request authorization and refresh tokens

I'm trying to get a authorization and refresh tokens. According to the Amazon Ads API doc, I need the to substitute my values in the request:

curl \ -X POST \ -H "Content-Type:application/x-www-form-urlencoded;charset=UTF-8" \ --data "grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_RETURN_URL&client_id=YOUR_CLIENT_ID&client_secret=YOUR_SECRET_KEY" \ https://api.amazon.com/auth/o2/token

I've replaced the parameter with my values, I want to know where to run the code, do I run it in the terminal or in the browser? Which part of the parameter should I run first, or do I copy and paste the whole parameter and run it at once?

Thanks for the help

Error on accessing anything from Amazon

I am trying to access the listProfiles but this gives me 401 error.

I am generating a valid access token and refresh token. doRefresh works completely fine and returns a new token but unable to fetch the data with the access token generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.