Download the PHP package skpassegna/old-freemius-php-sdk without Composer

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

Freemius PHP SDK

This SDK provides a PHP interface for interacting with the Freemius API from your own server-side applications or scripts. It handles authentication, request signing, and response parsing, enabling you to access and manage your Freemius account data, user information, plugin/theme installations, licenses, payments, and more – all from outside of your WordPress plugin or theme.

Note: A new, improved SDK is currently under development (by @skpassegna).

This SDK is particularly useful for building custom dashboards, reporting tools, integration with other services, or performing administrative tasks related to your Freemius products. It is not intended for use within your WordPress plugins or themes themselves; that's the role of the Freemius WordPress SDK.

Installation

Use Composer to install the SDK:

Usage

Here's a basic example demonstrating how to retrieve your plugin's information:

Authentication

The SDK handles authentication automatically. You provide your public and secret keys during initialization. The SDK uses a signature-based authentication method, generating a unique signature for each API request to ensure security.

Scopes

The $scope parameter is critical and determines the context of your API interactions. It specifies which Freemius entity the SDK will operate on and dictates which API endpoints are accessible. Here's a summary of common scopes:

Scope Description ID Used
plugin Access data for a specific plugin. Plugin ID
developer Access data across all plugins under your developer account. Developer ID
install Access data for a single plugin installation on a website. Installation ID
user Access data related to a specific Freemius user. User ID
app Access app level data App ID

API Calls

The Api() method is the primary way to interact with the Freemius API:

The Api() method returns the decoded JSON response from the Freemius API or the raw response if decoding fails. The Freemius API primarily uses JSON for data exchange.

Signed URLs

Generate secure, time-limited URLs for accessing protected resources:

Signed URLs are useful for scenarios where you need to provide direct access to a resource without sharing your secret key.

Sandbox Mode

Test your integration without affecting live data by enabling sandbox mode:

Make sure to use your sandbox API credentials when testing in sandbox mode.

Error Handling

The SDK may throw exceptions during API interactions. Proper error handling is essential:

Key API Endpoints and Examples

Here's a summary with examples to help you get started:

Plugin Scope:

Developer Scope:

Install Scope:

User Scope:

Remember to replace placeholders like YOUR_PLUGIN_ID, YOUR_APP_ID,YOUR_DEV_ID, pk_YOUR_PUBLIC_KEY, and sk_YOUR_SECRET_KEY with your actual values. Consult the Freemius API documentation for details on request parameters and response formats.

License

GPL-2.0+


All versions of old-freemius-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 skpassegna/old-freemius-php-sdk contains the following files

Loading the files please wait ....