Download the PHP package lai3221/amazon-ads-api-v1 without Composer

On this page you can find all versions of the php package lai3221/amazon-ads-api-v1. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amazon-ads-api-v1

Amazon Ads API v1 SDK for Laravel 11

CI Latest Stable Version

A complete, generated Laravel 11 SDK for the Amazon Ads API v1 full specification. The bundled specification combines generally available and beta v1 operations. It does not include legacy Amazon Ads API v0 endpoints.

The package currently contains:

See the README.zh-CN.md.

Beta notice: The full specification includes beta operations. Amazon may make breaking changes during a beta, and closed-beta resources require allowlisting for your client ID. Generating a method does not grant access to that resource.

Requirements

Installation

Laravel discovers the service provider and facade automatically. Publish the configuration when you need to customize it:

Configure Login with Amazon and the default regional/account context:

Valid regions are NA, EU, and FE.

Quick start

Every OpenAPI tag has an explicit client accessor, and every operation has an explicit method. Generated request models accept constructor arrays or fluent setters.

Dependency injection is also supported:

Arrays remain supported at API boundaries for incremental adoption, but generated models provide enum hydration, date-time hydration, nested model hydration, required-field validation, and array size validation.

Request headers and account context

The SDK always supplies Authorization, Amazon-Ads-ClientId, Accept, and User-Agent. The following official headers are resolved from config/amazon-ads.php or a per-call RequestContext:

SDK value Amazon header Typical use
profileId Amazon-Advertising-API-Scope Sponsored Ads profile-scoped operations
accountId Amazon-Ads-AccountId Amazon DSP and cross-product operations
managerAccountId Amazon-Ads-Manager-AccountId Manager account operations
acceptLanguage Accept-Language Localized response content

Generated methods enforce every header marked as required by that operation's OpenAPI definition. Missing required context produces a ConfigurationException before a request is transmitted.

Login with Amazon onboarding

Build an authorization URL and exchange the returned code for the long-lived refresh token:

Store client secrets and refresh tokens outside source control. In Laravel, refreshed access tokens are cached through the configured cache store. Set AMAZON_ADS_TOKEN_CACHE=false to disable the shared token cache.

Models, enums, and oneOf values

Object schemas expose English-documented getters and fluent setters:

String enum components are generated as PHP backed enums. oneOf components extend AbstractUnion and accept the selected JSON object shape:

Unknown response fields are preserved so minor server-side additions do not discard data.

Errors and retries

Non-2xx responses throw ApiException. Its responseBody is hydrated into the generated error model declared for that status code.

HTTP 408, 429, 500, 502, 503, and 504 responses, plus transient transport failures, are retried with Retry-After support or exponential backoff and jitter. Retry behavior is configurable with the AMAZON_ADS_MAX_RETRIES and AMAZON_ADS_RETRY_BASE_DELAY_MS environment variables.

Using the SDK outside Laravel

The generated client is framework-friendly but not framework-locked:

Updating the generated SDK

The authoritative source is committed at .openapi/amazon-ads-v1-all.json. To update it:

composer spec:check compares every schema, resource tag, operation ID, HTTP method, and path against generated-manifest.json. CI also verifies that generated files are deterministic and current.

Official sources

Contributing and security

Read SECURITY.md.

This is an independent open-source SDK and is not an official Amazon package. Amazon, Amazon Ads, and related marks are trademarks of Amazon.com, Inc. or its affiliates.

License

Released under the MIT License.


All versions of amazon-ads-api-v1 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
guzzlehttp/guzzle Version ^7.9
illuminate/contracts Version ^11.0
illuminate/support Version ^11.0
psr/log Version ^3.0
psr/simple-cache Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lai3221/amazon-ads-api-v1 contains the following files

Loading the files please wait ...