PHPackages                             ayles-software/laravel-zoho-desk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ayles-software/laravel-zoho-desk

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ayles-software/laravel-zoho-desk
================================

Laravel wrapper for Zoho Desk

1.3.0(4y ago)14.3k5[1 issues](https://github.com/ayles-software/laravel-zoho-desk/issues)MITPHPPHP ^7.2.5|^8.0

Since Nov 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ayles-software/laravel-zoho-desk)[ Packagist](https://packagist.org/packages/ayles-software/laravel-zoho-desk)[ RSS](/packages/ayles-software-laravel-zoho-desk/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

Zoho Desk for Laravel
=====================

[](#zoho-desk-for-laravel)

Zoho Desk Laravel provides an oauth2 client and sdk for Zoho Desk api.

Requirements
------------

[](#requirements)

- Laravel 6+
- PHP 7.2.5+

Installation
------------

[](#installation)

Install via using composer

```
composer require ayles-software/laravel-zoho-desk
```

Setup
-----

[](#setup)

Publish the config.

```
php artisan vendor:publish --provider="AylesSoftware\ZohoDesk\ServiceProvider"
```

You now need to populate the `config/zoho-desk.php` file with the credentials for your Zoho integration. You can create new API keys [here](https://api-console.zoho.com.au/). Add the following variables to your `.env` file.

```
ZOHO_DESK_REDIRECT_URL=
ZOHO_DESK_CLIENT_ID=
ZOHO_DESK_CLIENT_SECRET=
ZOHO_DESK_ACCESS_TYPE=
ZOHO_DESK_ORGANISATION_ID=
ZOHO_DESK_BASE_URL=

```

The config file also contains scopes for Zoho. The `access_type=offiline` scope is required to obtain a new access token. Access tokens **expire after 60 minutes**. For more information on scopes try the [documentation](https://desk.zoho.com.au/support/APIDocument.do#OauthTokens#OAuthScopes).

#### Migrations

[](#migrations)

This package uses `ZohoDeskAccess` model to manage access tokens. Run the migration to create this table.

```
php artisan migrate
```

OAuth flow
----------

[](#oauth-flow)

First you must authorize the application, this will require a controller and route to be setup. Once the application has been authorized then access to Zoho is self managed within this package. Once the access token expires, a new one will be request as needed.

`ZohoOAuth::class` will provide the OAuth flow and regeneration of the access token.

Example of Controller for authorization.

```
