Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Braybrooke committed Aug 7, 2020
1 parent a5dbca0 commit c270cd8
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# Laravel Zoho
A lightweight (for now) wrapper around the Zoho PHP SDK
# Laravel SNS Communication Records
A package to track and store events from AWS SNS, particularly those generated from SES events such as sent, delivered, clicked, bounced and complaints.

## Installation

```
composer require purplemountain/laravel-zoho
composer require purplemountain/sns-communication-records
```

## Setup
1. If you haven't already, you need to create an Oauth2 client within Zoho. This can be done [here](https://api-console.zoho.com/).

2. You want to choose a "Server-based Application" client within Zoho.

3. For the "Authorized Redirect URIs" entry, you need to add `your-app-domain.tld/oauth/zoho`. Don't worry we handle this route for you within your app.
1. Setup SES and SNS in the AWS console. (Documentation to follow!)

## Env
You will need to add the following details to your `.env` file and paste in the values from Zoho.

```
ZOHO_CLIENT_ID=
ZOHO_CLIENT_SECRET=
ZOHO_USER_EMAIL=
```
MAIL_MAILER=ses
MAIL_FROM_ADDRESS=noreply@mail.purplemountmedia.com
## Authorization
You need to authorize your app to access Zoho. You can do this by simply running `php artisan zoho:url` which will generate the url to authorize the app. Follow the prompts and you'll be be all set.

## Refreshing Tokens
Zoho tokens last for aprox 1 hour. To refresh the token using the refresh token provided, you can run `php artisan zoho:refresh`. We reccomend setting this up to be run every 5 minutes in your `App\Console\Kernel.php` file.
AWS_ACCESS_KEY_ID=<AWS_KEY>
AWS_SECRET_ACCESS_KEY=<AWS_SECRET>
```

0 comments on commit c270cd8

Please sign in to comment.