PHPackages                             afiqiqmal/huawei-push - 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. afiqiqmal/huawei-push

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

afiqiqmal/huawei-push
=====================

Simple Huawei Push in PHP

1.4.1(4y ago)969.1k—0%10[2 issues](https://github.com/afiqiqmal/huawei-push/issues)MITPHPPHP ^7.2|^8.0

Since Nov 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/afiqiqmal/huawei-push)[ Packagist](https://packagist.org/packages/afiqiqmal/huawei-push)[ RSS](/packages/afiqiqmal-huawei-push/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

[![Build Status](https://camo.githubusercontent.com/1dc3a3a3b53b41ca732d3f59cae7b8c0fb496059340816f9de4205af95e43364/68747470733a2f2f7472617669732d63692e6f72672f6166697169716d616c2f6875617765692d707573682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/afiqiqmal/huawei-push)[![Coverage](https://camo.githubusercontent.com/ffbf0da283dcefc1437263d1b8b0a5f939af9336f40d2b1f2c72b63b4dba28f0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6166697169716d616c2f6875617765692d707573682e737667)](https://codecov.io/gh/afiqiqmal/huawei-push)[![Packagist](https://camo.githubusercontent.com/06b51b1fb633687fa0dfecb7d7c9f32d5f4b29e66abd60980a4006619f4cb5a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6166697169716d616c2f6875617765692d707573682e737667)](https://packagist.org/packages/afiqiqmal/huawei-push)[![Packagist](https://camo.githubusercontent.com/33c6cfa9fedf770f3a6530f2b8f6ac86e4e3cf5baf6eedc4566a3bb0009f7b49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6166697169716d616c2f6875617765692d707573682e737667)](https://packagist.org/packages/afiqiqmal/huawei-push)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

[![alt text](https://camo.githubusercontent.com/f321c49cfc186dbb3a6a94412c06cd4f8310ad4c9b9241c9b881431afb3007f2/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f487561776569253230507573682532304b69742532305048502e706e673f7468656d653d6461726b267061636b6167654e616d653d6166697169716d616c2532466875617765692d70757368267061747465726e3d627269636b57616c6c267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d636c6f7564)](https://camo.githubusercontent.com/f321c49cfc186dbb3a6a94412c06cd4f8310ad4c9b9241c9b881431afb3007f2/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f487561776569253230507573682532304b69742532305048502e706e673f7468656d653d6461726b267061636b6167654e616d653d6166697169716d616c2532466875617765692d70757368267061747465726e3d627269636b57616c6c267374796c653d7374796c655f31266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d636c6f7564)

Huawei Push PHP
===============

[](#huawei-push-php)

### Installation

[](#installation)

```
composer require afiqiqmal/huawei-push

```

### Usage

[](#usage)

#### Get Access Token

[](#get-access-token)

References : [Huawei OAuth](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/open-platform-oauth-0000001053629189-V5#EN-US_TOPIC_0000001053629189__section12493191334711)

```
$access = HuaweiPushKit::make([
    'app_id' => 'YOUR APP ID',
    'client_secret' => 'YOUR CLIENT SECRET'
])
    ->getAccessToken();

//Laravel
$access = HuaweiPushKit::make(config('huawei'))->getAccessToken();
$access = app(HuaweiPushKit::class)->getAccessToken();
```

Response

```
{
    "access_token": "ACCESS TOKEN",
    "expires_in": 3600, // seconds
    "token_type": "Bearer"
}
```

#### Push Message

[](#push-message)

References : [Huawei Push Kit](https://developer.huawei.com/consumer/en/doc/development/HMSCore-References-V5/https-send-api-0000001050986197-V5#EN-US_TOPIC_0000001050986197__p2559323141314)

```
$response = HuaweiPushKit::make([])
    ->withAccessToken('ACCESS TOKEN')
    ->push(
        NotificationPayload::make()
            ->setValidateOnly(false)
            ->setMessage(
                Message::make()
                    ->setNotification(
                        Notification::make()
                            ->setTitle("Testing Title")
                            ->setBody("Body")
                            ->setImage("https://seeklogo.com/images/L/laravel-logo-41EC1D4C3F-seeklogo.com.png")
                    )
                    ->setAndroid(
                        Config::make() // AndroidConfig
                            ->setUrgency(2)
                            ->setCategory(1)
                            ->setTimeToLive(3360)
                            ->setTags('TrumpIsDown')
                            ->isStaging(true)
                            ->setNotification(
                                AndroidNotification::make() // Notification
                                    ->setClickAction(
                                        ClickAction::make()
                                        ->setType(1)
                                        ->setIntent("pushscheme://com.huawei.hms.hmsdemo/deeplink?#Intent;i.isFeed=1;S.feedDocId=0LauP4X6;end")
                                        ->setUrl('https://www.google.com')
                                    )
                                    ->setImage('https://seeklogo.com/images/L/laravel-logo-41EC1D4C3F-seeklogo.com.png')
                                    ->setIcon('/raw/ic_launcher2')
                                    ->setColor('#FFFFFF')
                                    ->setSound('/raw/shake')
                                    ->setDefaultSound(false)
                                    ->setPriority(3)
                                    ->setChannelId("HMSTestDemo")
                                    ->setAutoClear(100000) // ms
                                    ->setSummary("Summary")
                                    ->setStyle(0)
                                    ->setNotifyId(123456)

                                    ->setButtons([
                                        Button::make()->setName("Home")->setActionType(0)
                                    ])
                            )
                    )
                    ->setTopic("Topic")
            )
    );
```

Response

```
{
    "code": "80000000",
    "msg": "Success",
    "requestId": "160502268063038626000406"
}
```

### TODO

[](#todo)

- WebPUSH
- APNS

License
-------

[](#license)

Licensed under the [MIT license](http://opensource.org/licenses/MIT)

[![](https://camo.githubusercontent.com/fae49c14c08b15cedc0f829bf690717f2edabe33f88a6c67f6f8f7225702abc6/68747470733a2f2f692e696d6775722e636f6d2f5932677172326a2e706e67)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~48 days

Recently: every ~96 days

Total

9

Last Release

1620d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.4.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1285084ec2d00e6c1442d03992cd156772da7267efdcbe59ac913c0676a9eb89?d=identicon)[afiqiqmal](/maintainers/afiqiqmal)

---

Top Contributors

[![afiqiqmal](https://avatars.githubusercontent.com/u/9051312?v=4)](https://github.com/afiqiqmal "afiqiqmal (18 commits)")

---

Tags

composerhacktoberfesthuaweihuawei-pushlaravelphppush-kit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/afiqiqmal-huawei-push/health.svg)

```
[![Health](https://phpackages.com/badges/afiqiqmal-huawei-push/health.svg)](https://phpackages.com/packages/afiqiqmal-huawei-push)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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