Download the PHP package webmarketer/webmarketer-php without Composer
On this page you can find all versions of the php package webmarketer/webmarketer-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webmarketer/webmarketer-php
More information about webmarketer/webmarketer-php
Files in webmarketer/webmarketer-php
Package webmarketer-php
Short Description The official PHP SDK for Webmarketer (app.webmarketer.io)
License MIT
Homepage https://github.com/webmarketer-saas/php-webmarketer-sdk
Informations about the package webmarketer-php
PHP SDK for Webmarketer
The official PHP SDK for Webmarketer (app.webmarketer.io).
Install
To add this package, your project must meet several requirements :
- PHP >= 5.6
- Composer (install composer)
- OpenSSL extension for PHP
This package is the core SDK and is not installed with any specific HTTP library. It uses PSR-7 implementation Httplug to be used with any PSR-7 compliant client. If you don't know which to use, we recommend using Guzzle (you just need to require it in your project).
Usage
Basic example
Authentication
The SDK exposes auth providers to let you chose how you want to authenticate against the Webmarketer API
Service Account Provider
This is the default authentication method used by the SDK if no provider is specified manually.
Without any configuration the SDK will try to retrieve a service-account file in the location specified by the environment variable named WEBMARKETER_APPLICATION_CREDENTIALS
.
Example :
- My Webmarketer Service Account is located at the following path on my server :
/secrets/webmarketer/sa.json
- I set the env. variable on my server with the path :
WEBMARKETER_APPLICATION_CREDENTIALS=/secrets/webmarketer/sa.json
- I do not need to specify an auth provider as the SDK will automatically authenticate with my Service Account
It is possible to specify the stringified JSON sa aswell by simply passing the ServiceAccountAuthProvider
manually to the SDK :
Refresh Token Provider
The refresh token auth provider lets you authenticate against the API with a personal refresh token. You just need to instantiate the Webmarketer SDK with the RefreshTokenAuthProvider
:
Official integrations
Following integrations are developed and maintained by the Webmarketer Team and are based on this SDK.
Resources
All versions of webmarketer-php with dependencies
php-http/httplug Version ^1.0 || ^2.0
php-http/multipart-stream-builder Version ^1.0
php-http/message Version ^1.0
php-http/client-common Version ^1.1 || ^2.2
php-http/discovery Version ^1.0