PHPackages                             processdrive/onedrive-integration - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. processdrive/onedrive-integration

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

processdrive/onedrive-integration
=================================

Onedrive Integration

41.2k2PHP

Since Apr 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/robertantonyjaikumar/onedrive)[ Packagist](https://packagist.org/packages/processdrive/onedrive-integration)[ RSS](/packages/processdrive-onedrive-integration/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

 [![](https://raw.githubusercontent.com/antony382/roles-and-permission/master/public/images/logo.png)](https://raw.githubusercontent.com/antony382/roles-and-permission/master/public/images/logo.png)

[![Latest Stable Version](https://camo.githubusercontent.com/25eefd9e55dfa0a8f8e203162459d7700f9a51c0cf158f505af7d1ecc76ecdec/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6c61726176656c2f762f737461626c65)](https://camo.githubusercontent.com/25eefd9e55dfa0a8f8e203162459d7700f9a51c0cf158f505af7d1ecc76ecdec/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6c61726176656c2f762f737461626c65) [![Latest Unstable Version](https://camo.githubusercontent.com/22388f695a8e81b6f639173dd9203a7af7aa926d1af8ff49e4d5a91f55940d10/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/laravel/laravel) [![License](https://camo.githubusercontent.com/4fe03af169d521f7dc79459741eae96cae976c0186f5e8e758174e710383b9d6/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/laravel/laravel)

**Onedrive Integration**

This library helps you to integrate your php Application with Onedrive

**Installation**

```
composer require "processdrive/onedrive-integration":"dev-master"

```

**Configuration**

To Integrate your app with onedrive you need follow below steps:

step 1: Create application in [Onedrive Application Portal](https://apps.dev.microsoft.com/#/appList)

step 2: Generate new password

step 3: Add redirect URL (Here auth\_code will be sent to this url)

step 3: Add Delegated permission (Files.ReadWrite.All and Directory.ReadWrite.All)

step 4: Edit /vendor/onedrive/src/config/onedrive.php and add your creds.

**How to Use ?**

use onedrive\\models\\onedrive\_business; // for onedrive business and you can use onedrive\_personal for personal accounts

```
$onedrive = new onedrive_business();

$onedrive->get_code_url() // It will give redirect uri

```

After authenticate:

Onedrive will redirect(this from onedrive application configuration) to your php application

For example:

```
http://localhost/index.php  // your redirect page

http://localhost/index.php?code=** // response from onedrive

$code // from onedrive

$onedrive->get_access_token_from_code($code);

```

it will generate access\_token and refresh\_token

```
$onedrive->access_token // will give accesstoken

$onedrive->refresh_token // will give refreshtoken

$onedrive->get_access_token_from_refresh_token($refresh_token);

```

it will generate access\_token and refresh\_token

```
$onedrive->access_token // will give accesstoken

$onedrive->refresh_token // will give refreshtoken

```

**Get Items**

```
$onedrive->get_items($parent_folder_id = null);

```

**Create Folder**

```
$onedrive->create_folder($folder_name, $parent_folder_id = null);

```

**Delete Folder or File**

```
$onedrive->delete_item_from_drive($item_id);

```

**Create File**

```
$onedrive->create_file($file_path, $parent_id = null, $file_name = null);

```

**Download File**

```
$onedrive->download_file($file_id);

```

**Get Share link of Folder or File**

```
$onedrive->get_share_link_of_an_item($file_id);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33420753?v=4)[Jaikumar M](/maintainers/robertantonyjaikumar)[@robertantonyjaikumar](https://github.com/robertantonyjaikumar)

### Embed Badge

![Health badge](/badges/processdrive-onedrive-integration/health.svg)

```
[![Health](https://phpackages.com/badges/processdrive-onedrive-integration/health.svg)](https://phpackages.com/packages/processdrive-onedrive-integration)
```

###  Alternatives

[thunderpush/php-thunderclient

A PHP library for sending messages to Thunderpush server.

169.6k](/packages/thunderpush-php-thunderclient)

PHPackages © 2026

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