PHPackages                             brainstream/nylas-php - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. brainstream/nylas-php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

brainstream/nylas-php
=====================

Nylas PHP SDK for api version 3

V1.0.0(1y ago)23.3k↓50%1[1 PRs](https://github.com/brainstreaminfo/nylas-v3-php/pulls)MITPHPPHP ^8.1

Since Oct 30Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/brainstreaminfo/nylas-v3-php)[ Packagist](https://packagist.org/packages/brainstream/nylas-php)[ RSS](/packages/brainstream-nylas-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (4)Used By (0)

Nylas PHP SDK for api version 3
===============================

[](#nylas-php-sdk-for-api-version-3)

This is the GitHub repository for the Nylas PHP SDK.

The Nylas Communications Platform provides REST APIs for [Email](https://developer.nylas.com/docs/v3/email/), [Calendar](https://developer.nylas.com/docs/v3/calendar/), and [Contacts](https://developer.nylas.com/docs/v3/contacts/), and the Nylas SDK is the quickest way to build your integration using PHP.

Here are some resources to help you get started:

- [Sign up for your free Nylas account](https://dashboard-v3.nylas.com/register)
- [Nylas API v3 Quickstart Guide](https://developer.nylas.com/docs/v3/getting-started/quickstart/)
- [Nylas API Reference](https://developer.nylas.com/docs/v3/api-references/)

⚙️ Install
----------

[](#️-install)

This library is available on
You can install it by running

```
composer require brainstream/nylas-php
```

⚡️Usage
-------

[](#️usage)

To use this SDK, you must first [get a free Nylas account](https://dashboard-v3.nylas.com/register).

Then, follow the Quickstart guide to [set up your first app and get your API keys](https://developer.nylas.com/docs/v3/getting-started/quickstart/).

### 🚀 Making Your First Request

[](#-making-your-first-request)

You use the `NylasClient` object to make requests to the Nylas API. The SDK is organized into different resources, each of which has methods to make requests to the API. Each resource is available through the `NylasClient` object configured with your API key.

For example, first configure client object like below:

```
use Nylas\Client;

require __DIR__ . '/vendor/autoload.php';

$options = [
    'api_key'   => 'NYLAS_API_KEY',
    'client_id' => 'NYLAS_CLIENT_ID',
    'region'    => 'NYLAS_REGION', // optional - Default "us"
];

$nylasClient = new Client($options);
```

Then use it for make consecutive api requests.

Administrative Api info.
------------------------

[](#administrative-api-info)

### Application api

[](#application-api)

Application api could be like:

```
try {
    $applications = $nylasClient->Administration->Application->list();
    print_r($applications);
} catch (GuzzleException) {}
```

### Authentication api

[](#authentication-api)

Nylas support 2 types of user authentication

1. Nylas hosted auth(OAuth 2.0)
2. Custom auth

### Grant api

[](#grant-api)

Grants associate with an application. It could be like:

```
try {
    $grants = $nylasClient->Administration->Grants->list();
    print_r($grants);
} catch (GuzzleException) {}
```

### Connectors api

[](#connectors-api)

Connectors(providers) of an application.

```
try {
    $connectors = $nylasClient->Administration->Connectors->list();
    print_r($connectors);
} catch (GuzzleException) {}
```

### Connectors Credential api

[](#connectors-credential-api)

```
try {
    $credentials = $nylasClient->Administration->ConnectorsCredentials->list(
        PROVIDER_STRING
    );
    print_r($credentials);
} catch (GuzzleException) {}

//NOTE: Replace "PROVIDER_STRING" with real provider string
```

Email, Calender and Draft apis usage
------------------------------------

[](#email-calender-and-draft-apis-usage)

### Email api

[](#email-api)

```
try {
    $messages = $nylasClient->Messages->Message->list(
        GRANT_ID_STRING
    );
    print_r($messages);
} catch (GuzzleException) {}

//NOTE: Replace "GRANT_ID_STRING" with real grant id
```

### Calendar api

[](#calendar-api)

```
try {
    $calendars = $nylasClient->Calendars->Calendar->list(
        GRANT_ID_STRING
    );
    print_r($calendars);
} catch (GuzzleException) {}

//NOTE: Replace "GRANT_ID_STRING" with real grant id
```

### Drafts api

[](#drafts-api)

```
try {
    $drafts = $nylasClient->Drafts->Draft->list(
        GRANT_ID_STRING
    );
    print_r($drafts);
} catch (GuzzleException) {}

//NOTE: Replace "GRANT_ID_STRING" with real grant id
```

Launching the tests
-------------------

[](#launching-the-tests)

1. Initialise composer dependency by `composer install`
2. Add your Nylas App. info in tests/AbsCase.php
3. Launch the test with `composer run-script test`
4. Another way to run tests: ./tests/do.sh foo.php --filter fooMethod, see tests/do.sh

Acknowledgements
----------------

[](#acknowledgements)

This project is based on [lanlin/nylas-php](https://github.com/lanlin/nylas-php), which is licensed under the MIT License. The original code has been modified and is also available under the MIT License.

📝License
--------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

Contact us
----------

[](#contact-us)

If you need additional assistance, drop us an email at .

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance49

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

566d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/678778?v=4)[Brainstream](/maintainers/Brainstream)[@brainstream](https://github.com/brainstream)

---

Top Contributors

[![anandbrainstream](https://avatars.githubusercontent.com/u/187748752?v=4)](https://github.com/anandbrainstream "anandbrainstream (1 commits)")[![brainstreaminfo](https://avatars.githubusercontent.com/u/102042961?v=4)](https://github.com/brainstreaminfo "brainstreaminfo (1 commits)")[![rina-bhalodia](https://avatars.githubusercontent.com/u/113351596?v=4)](https://github.com/rina-bhalodia "rina-bhalodia (1 commits)")

---

Tags

email-syncnylasphpsdkphpemailcalendarcontactsnylasnylas-v3-api-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brainstream-nylas-php/health.svg)

```
[![Health](https://phpackages.com/badges/brainstream-nylas-php/health.svg)](https://phpackages.com/packages/brainstream-nylas-php)
```

###  Alternatives

[garethp/php-ews

A PHP Library to interact with the Exchange SOAP service

113610.3k4](/packages/garethp-php-ews)[mailjet/mailjet-apiv3-php

PHP wrapper for the Mailjet API

27411.4M77](/packages/mailjet-mailjet-apiv3-php)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)[martian/spammailchecker

A laravel package that protect users from entering non-existing/spam email addresses.

422.0k](/packages/martian-spammailchecker)[naif/php-cpanel-email

Manage cPanel Email Addresses

211.3k](/packages/naif-php-cpanel-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
