Download the PHP package engagespot/php-sdk without Composer

On this page you can find all versions of the php package engagespot/php-sdk. 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 php-sdk

Engagespot PHP SDK

The Engagespot PHP SDK enables seamless integration and notification sending via the Engagespot API in PHP applications. Engagespot provides a unified platform for delivering targeted notifications to users through channels like in-app messages, web push, and email.

Installation

Install the Engagespot PHP SDK using Composer:

Getting Started

Step 1: Obtain API Credentials

Sign up for an account on Engagespot and acquire your API key and API secret.

Step 2: Initialize EngagespotClient

Include the Engagespot PHP SDK in your PHP code and create an instance of EngagespotClient with your API key, API secret, and signing key (if applicable):

here are examples of the two types of initializations for the EngagespotClient:

  1. Initialization with individual parameters:

In this example, the EngagespotClient is initialized with individual parameters for the API key, API secret.

  1. Initialization with an associative array:

In this example, the EngagespotClient is initialized with an associative array that includes the API key, API secret, signing key, and base URL.

Remember to replace 'your-api-key', 'your-api-secret', and 'your-signing-key' with your actual Engagespot API credentials. The base URL is optional and defaults to 'https://api.engagespot.co/v3' if not provided. The signing key is also optional and can be omitted if not used.

Step 3: Sending a Notification

Sending a Notification

Prepare notification data and use the send method:

Legacy Payload

Preferred Payload

Sending the notification

Create OR Update User

You can add any keyvalue pairs to profile.

Generating User Token

Generate a JWT token for a user for authentication:

Note : Remember that for generating user token you must need to Initialize engagespot via associative array OR by

because signingKey is required for generating user tokens

Creating Signing Key

You can generate your public-private signing key pair from Engagespot console, and this private key should be the secret signing key for generating user tokens

signing_key-71ae93037d6197a7db8a1894c2293079

NOTE: When you generate the signing key, Engagespot will store only the public key in our database. You should download the private key and use it for signing your user tokens. You won't be able to retrieve the private key after this step.

Additional Configuration

Set additional configuration options if needed:

You can set SigningKey after initializing EngagespotClient by

Exceptions

The SDK throws \InvalidArgumentException for missing or invalid parameters during initialization or notification creation.

Note

Replace placeholder values such as 'your-api-key', 'your-api-secret', and 'your-signing-key' with your actual Engagespot API credentials.

For detailed information about Engagespot API parameters, refer to the Engagespot API documentation.

Feel free to explore and contribute to the SDK!


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0 || ^8.0
guzzlehttp/guzzle Version ^7.8
firebase/php-jwt Version ^6.10
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 engagespot/php-sdk contains the following files

Loading the files please wait ....