Download the PHP package onecommunity/client without Composer

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

One Community

An easy-to-use PHP client to access the One Community API.

Installation

Using Composer:

composer require onecommunity/client

Contact us with your public key to receive your API key.

Usage

Initializing the Client

Sending Requests

See the Examples directory for working examples.

UserRequest

Returns the User object of the authenticated user. Great for testing.

SendTransactionalMailRequest

Responses

The following HTTP status codes are used:

HTTP Status Code Description
200 OK Everything is OK, the body contains the payload.
400 Bad Request Indicates an authentication error.
404 Not Found Some ID refers to an unknown model (e.g., unknown account or mail).
422 Unprocessable Entity Validation errors.
429 Too Many Requests You cannot send more than 60 requests per minute.

If anything unexpected occurs a OneCommunity\Exceptions\RequestException is thrown (e.g., if the API does not return a valid JSON response).

All responses (except 200 OK) contain a message attribute, explaining what went wrong. Furthermore, 400 Bad Requests responses contain a code attribute which can contain one of the following values:

code message
100 Invalid API key
101 Could not decode Bearer token
102 No API key found on request
103 No Bearer token found on request
104 Token could not be verified
201 Client not found
202 User not found or not accessible by this API Client
501 No access to this project or invalid project
502 No access from this IP

The validation errors of a 422 Unprocessable Entity response are structured as follows:

Security

The API is based on JWT API, an efficient and secure machine-to-machine API using JSON Web Tokens and asymmetric request signing. Advantages of this approach include:

Due to the asymmetric nature of this protocol, a public/private key pair needs to be generated (RSA 2048 bit). The key pair can be generated by issuing the following commands. Please send your public key (public_rsa.pem) to us and keep your private key safe.

Generating the Public/Private Key Pair


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
jarnovanleeuwen/jwtapi Version ^0.4.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 onecommunity/client contains the following files

Loading the files please wait ....