Download the PHP package helpscout/api-laravel without Composer

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

Help Scout Service Provider and Facade for Laravel and Lumen

Build Status Maintainability

This package contains a service provider and facade for use with Laravel and Lumen.

Installation

The Help Scout Service Provider can be installed via Composer by requiring the helpscout/api-laravel package in your project's composer.json.

Then run a composer update

To use the Help Scout Service Provider, you must register the provider when bootstrapping your application.

Lumen

In Lumen find the Register Service Providers in your bootstrap/app.php and register the Help Scout Service Provider.

Laravel

In Laravel find the providers key in your config/app.php and register the Help Scout Service Provider.

Find the aliases key in your config/app.php and add the Help Scout facade alias.

Configuration

This package offers two ways to configure your client from within the service provider. You can use the client_credentials auth type or you can use the legacy_token auth type.

Client Credentials Flow

The client_credentials auth type uses the OAuth2 grant of the same name described on the Mailbox API 2.O Authentication page.

When using this method, if the API client does not have an access_token when a request is make, it will make a pre-flight request to retrieve that token from the Mailbox 2.0 https://api.helpscout.net/v2/oauth2/token endpoint. Every subsequent request to the API after that will use the access_token retrieved in this first request. See this page for more details about the client_credentials authorization flow.

To use this grant type, set the following environment variables:

Legacy Credentials Flow

To ease the transition of legacy apps to the new API, the API client uses the transition service to exchange the legacy clientId and apiKey for an access_token.

Just as with the client_credentials flow described above, if the API client does not have an access_token when attempting an API call, it will make a pre-flight request to the transition service to exchange the legacy credentials for a valid access_token.

To use this grant type, set the following environment variables:

Changing credentials between requests

If you do not provide credentials when the client is created, you must provide either an access_token or valid credentials for one of the two auth types described above. You can do this with a concrete instance of the client like so:

To customize the configuration file, publish the package configuration using Artisan.

The settings can be found in the generated config/helpscout.php configuration file.

Usage

This service provider offers several ways to use the API Client from within your app. You can resolve the client instance from the container by using the helpscout alias, by specifying the Helpscout\Api\ApiClient class name, or you may type-hint the client in a class constructor or a method signature. If you configured the client with credentials as described above, there is no further configuration needed.

Use the full class name to get the client from the container.

Use the alias to get the client from the container.

Or, type-hint the client in a constructor or method signature.

Additionally, you can request and resolve specific API Endpoints from the container in a similar fashion. For a list of the endpoints and their aliases, see the ApiClient::AVAILABLE_ENDPOINTS in the API client library. In the same fashion as the ApiClient class, the container will return a fully-configured endpoint that is ready for use as long as you specified the auth type and appropriate credentials in your config/helpscout.php file.

If the HelpScout facade is registered within the aliases section of the application configuration, you can also use the following technique.

Links


All versions of api-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
helpscout/api Version ~3.0
illuminate/support Version ^5.6|^6.0|^7.0|^8.0|^9.0|^10.0|^11.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 helpscout/api-laravel contains the following files

Loading the files please wait ....