PHPackages                             notf0und/outlook-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. [API Development](/categories/api)
4. /
5. notf0und/outlook-php

ActivePackage[API Development](/categories/api)

notf0und/outlook-php
====================

The api to handle outlook rest api using php

0.1.7(6y ago)0109MITPHP

Since Sep 10Pushed 6y agoCompare

[ Source](https://github.com/notf0und/outlook-php)[ Packagist](https://packagist.org/packages/notf0und/outlook-php)[ RSS](/packages/notf0und-outlook-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

outlook-rest-php
================

[](#outlook-rest-php)

A handy tool to work with outlook rest api

example code is available in the examples directory
---------------------------------------------------

[](#example-code-is-available-in-the-examples-directory)

#### Installation

[](#installation)

```
    composer require notf0und/outlook-php
```

#### Authenticator

[](#authenticator)

```
define('APP_ID', '07cdaba2-7865-4cec-8c82-b6d69679c88c');
define('APP_PASSWORD', 'qR7tHeUpDhLXiZhPdXaT5aU');

// redirect uri can be one of the absolute url registered with the app
// if not given or null then it takes current url
$authenticator = new Outlook\Authorizer\Authenticator(APP_ID, APP_PASSWORD, $redirectUri = null);

// to get token from code the below function call should be placed at the top of page
// where redirection is coming back
// the below function simply exchange code and get token from authorization server.
$token = $authenticator->getToken();

if(!$token) {
    //if $token is not available then we get login url
    echo $authenticator->getLoginUrl($scopes = [], $redirectUri = null);
} else {
    // if $token is available it is instance of Outlook\Authorizer\Token
    var_dump($token);
}
```

#### Event Management

[](#event-management)

```
define('APP_ID', '07cdaba2-7865-4cec-8c82-b6d69679c88c');
define('APP_PASSWORD', 'qR7tHeUpDhLXiZhPdXaT5aU');

$authenticator = new Outlook\Authorizer\Authenticator(
    APP_ID,
    APP_PASSWORD,
    $redirectUri = "http://localhost/outlook-php/examples/events.php"
);

// create session instance which implements SessionContract
// you can replace session implementation with your class implementing SessionContract
$sessionManager = new \Outlook\Authorizer\Session();

//token can be removed manually
//$sessionManager->remove(); // if need to remove token manually from session

// create event authorizer to get token with appropriate scope
// it accepts authenticator and session instance
$eventAuthorizer = new \Outlook\Events\EventAuthorizer($authenticator, $sessionManager);

// if token is already available in session and not expired
$token = $eventAuthorizer->isAuthenticated();

if (!$token) {
    //if token is not available we create login url with necessary scopes
    echo 'Login';
} else {
    //if we have token we can create eventManager
    // it accepts Outlook\Authorizer\Token as argument
    $eventManager = new \Outlook\Events\EventManager($token);

    // get all events returns each item as Event object
    $events = $eventManager->all();

    foreach ($events as $event) {
        echo $event->id. " -> ". $event;
        echo '';
    }

    //get single event returns Outlook\Events\Event instance
    $event = $eventManager->get($eventId = 'XXXX');
    var_dump($event);

    //create event accepts Outlook\Events\Event instance
    // nested key name must be case sensitive correctly according to their docs.
    // only outer properties will be converted to Study case automatically
    $event = new \Outlook\Events\Event(['subject' => 'Discuss the Calendar REST API']);
    $event->body = ['ContentType' => 'HTML', 'Content' => 'Hello this is test Event'];
    $event->start = ["DateTime" => "2014-02-02T18:00:00", "TimeZone" => "Pacific Standard Time"];
    $event->end = ["DateTime" => "2014-02-02T19:00:00", "TimeZone" => "Pacific Standard Time"];
    $event = $eventManager->create($event);
    var_dump($event);

    //update event accepts Outlook\Events\Event instance with valid id
    $event = $eventManager->get($eventId = 'XXXX');
    $event->Body->Content = "new Updated Content";
    $updateEvent = $eventManager->update($event);
    var_dump($updateEvent); // event instance with updated values

    //delete event accepts Outlook\Events\Event instance with valid id
    $event = $eventManager->get($eventId = 'XXXX');
    $response = $eventManager->delete($event);
    var_dump($response); // response true or raised exception
```

Api Documentation
=================

[](#api-documentation)

- [Outlook Rest Api](https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations)

TODO
====

[](#todo)

- Add support for sync events
- Add contacts apis
- Add mail apis

contributions
=============

[](#contributions)

- pull requests are most welcome.
- please follow psr2 standards for the code and submit your pull request with valid breaking/enhancement use case.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% of commits — single point of failure

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

Every ~161 days

Recently: every ~94 days

Total

8

Last Release

2403d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2713486?v=4)[Fabián Gonzalo Artur de la Villarmois](/maintainers/notf0und)[@notf0und](https://github.com/notf0und)

---

Top Contributors

[![sagarrabadiya](https://avatars.githubusercontent.com/u/5405403?v=4)](https://github.com/sagarrabadiya "sagarrabadiya (21 commits)")[![JanPetterMG](https://avatars.githubusercontent.com/u/11933090?v=4)](https://github.com/JanPetterMG "JanPetterMG (1 commits)")

---

Tags

outlookphp-rest-outlook

### Embed Badge

![Health badge](/badges/notf0und-outlook-php/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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