PHPackages                             amo-tm/amosdk-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. amo-tm/amosdk-php

ActiveLibrary[API Development](/categories/api)

amo-tm/amosdk-php
=================

php sdk for amo | team messenger API

v1.3.x-dev(1y ago)24265[1 PRs](https://github.com/amo-tm/amosdk-php/pulls)MITPHPPHP ^7.4 || ^8.0

Since Dec 7Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/amo-tm/amosdk-php)[ Packagist](https://packagist.org/packages/amo-tm/amosdk-php)[ RSS](/packages/amo-tm-amosdk-php/feed)WikiDiscussions v1.3.x Synced 6d ago

READMEChangelog (7)Dependencies (7)Versions (35)Used By (0)

amo | team messenger PHP sdk
============================

[](#amo--team-messenger-php-sdk)

[![Build Status](https://camo.githubusercontent.com/f944608332c43f6d643793531f80781946c7a156b7a1583bbe03c0b537c9b780/68747470733a2f2f7472617669732d63692e6f72672f616d6f2d746d2f616d6f73646b2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/amo-tm/amosdk-php)[![Latest Stable Version](https://camo.githubusercontent.com/08ca2dca41cae34cf2c0a0cd70b9db9932605cb4a4116fcab8a3b54aa7d0d2bd/68747470733a2f2f706f7365722e707567782e6f72672f616d6f2d746d2f616d6f73646b2d7068702f762f737461626c652e737667)](https://packagist.org/packages/amo-tm/amosdk-php)[![Total Downloads](https://camo.githubusercontent.com/eb7dbfd2cb69e8f593629dc4c2b66f2fb28df056f5128661b31cfc9696175ba1/68747470733a2f2f706f7365722e707567782e6f72672f616d6f2d746d2f616d6f73646b2d7068702f646f776e6c6f6164732e737667)](https://packagist.org/packages/amo-tm/amosdk-php)[![License](https://camo.githubusercontent.com/dbadd62248717fa125c900f71af0383eb4e0f5626e7fa2ddfd6ff9af7728346f/68747470733a2f2f706f7365722e707567782e6f72672f616d6f2d746d2f616d6f73646b2d7068702f6c6963656e73652e737667)](https://packagist.org/packages/amo-tm/amosdk-php)[![Code Coverage](https://camo.githubusercontent.com/4b82ed6c92b28ad7ad5bd3ab69ed52c3d271041cf710b949eead81203fe5fd3c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f616d6f2d746d2f616d6f73646b2d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/amo-tm/amosdk-php?branch=master)

Requirements
------------

[](#requirements)

PHP 7.4.0 and later.

Composer
--------

[](#composer)

You can install the sdk via [Composer](http://getcomposer.org/). Run the following command:

```
composer require amo-tm/amosdk-php:"^v1.3@beta
```

To use the sdk, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once('vendor/autoload.php');
```

Getting Started
---------------

[](#getting-started)

Simple usage:

```
use \Amo\Sdk\AmoClient;

$sdk = new AmoClient([
    'clientID' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
]);
```

Initiate client with access token:

```
use \Amo\Sdk\AmoClient;
use \League\OAuth2\Client\Token\AccessToken;

// Token fetch from store
/** @var AccessToken $accessToken */
$accessToken = null;

$sdk = new AmoClient([
    'clientID' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
    'accessToken' => $accessToken,
]);
```

Receive appToken
----------------

[](#receive-apptoken)

This type of tokens issued by client library. Your can issue token on every request or store them in your datastore.

```
use \Amo\Sdk\AmoClient;

$sdk = new AmoClient([
    'clientID' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
]);

$appScopedSdk = $sdk->withToken($sdk->getApplicationToken(['teams', 'profiles']))
// store token in database
```

Create team
-----------

[](#create-team)

> **REQUIRED:** AppToken
>
> **SCOPE:** teams

```
use \Amo\Sdk\AmoClient;
use \Amo\Sdk\Models\Team;

$sdk = new AmoClient([
    'clientID' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
]);

$appScopedSdk = $sdk->withToken($sdk->getApplicationToken(['teams', 'profiles']))
$newTeam = $appScopedSdk->team()->create(new Team([
    'title' => 'testTeamName'
]))

print "team created with id " . $newTeam->getId();
```

Create profile
--------------

[](#create-profile)

> **REQUIRED:** AppToken
>
> **SCOPE:** profiles

```
use \Amo\Sdk\AmoClient;
use \Amo\Sdk\Models\Team;

$sdk = new AmoClient([
    'clientID' => 'your_client_id',
    'clientSecret' => 'your_client_secret',
]);

$appScopedSdk = $sdk->withToken($sdk->getApplicationToken(['teams', 'profiles']))
$createdProfile = $appScopedSdk->profile()->create(new Profile([
    'name' => 'Tim',
    'email' => 'tim@domain.com',
    'external_id' => '7688d6ac-57a1-421e-ac41-a68205d96d4e'
]));

print "profile created with id " . $createdTeam->getId();
```

Invite profile to team
----------------------

[](#invite-profile-to-team)

> **REQUIRED:** TeamToken
>
> **SCOPE:** profiles,teams

```
/** @var \Amo\Sdk\AmoClient $appScopedSdk */
$teamService = $appScopedSdk->team($newTeam->getId())->scope();

// save team token to datastore
$teamToken = $teamService->getAccessToken();

$invitedUser = $teamService->invite($createdProfile->getId(), new TeamProps([
    'is_admin' => true,
    'position' => 'CEO'
]));
```

Kick profile from team
----------------------

[](#kick-profile-from-team)

> **REQUIRED:** TeamToken
>
> **SCOPE:** profiles,teams

```
/** @var \Amo\Sdk\Service\TeamService $teamService */
$teamService->kick($invitedUser->getId());
```

Subject create
--------------

[](#subject-create)

> **REQUIRED:** TeamToken

```
/** @var \Amo\Sdk\Service\TeamService $teamService */
$subjectService = $teamService->subject();
$newSubject = $subjectService->create(new Subject([
    'title' => 'Subject Title',
    'external_link' => 'https://example.com/',
    'author' => Participant::user($createdProfile),
    'participants' => new ParticipantCollection([
        Participant::user($createdProfile->getId()),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    ),
    'subscribers' => new ParticipantCollection([
        Participant::user('ebfaf836-f07b-4df5-809c-2bedb4a2f924'),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    ),
    'threads' => new SubjectThreadCollection([
        new SubjectThread([
            'title' => 'Subject Thread #1',
            'avatar_url' => 'https://picsum.photos/600'
        ]),
        new SubjectThread([
            'title' => 'Subject Thread #2',
            'avatar_url' => 'https://picsum.photos/600'
        ]),
    ]),
    'status' => new SubjectStatusCollection([
        SubjectStatus::status('Status', '#F9F6EE'),
        SubjectStatus::status('Title', '#CFE1A7'),
    ])
]));

print "subject created with id " . $newSubject->getId();
```

Subject participants add
------------------------

[](#subject-participants-add)

> **REQUIRED:** TeamToken

```
@var \Amo\Sdk\Service\TeamService $teamService */
$subjectService = $teamService->subject($createdSubject->getId());

$participantsAddResponse = $subjectServie->participantsAdd([
    new ParticipantCollection(
        Participant::user('d31f3f74-6fc0-41ae-b2f9-42eccd4f80b8'),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    )
]);

print 'count current participants: '. $participantsAddResponse->getCount();
```

Subject participants remove
---------------------------

[](#subject-participants-remove)

> **REQUIRED:** TeamToken

```
@var \Amo\Sdk\Service\SubjectService $subjectService */
$participantsRemoveResponse = $subjectService->participantsRemove([
    new ParticipantCollection(
        Participant::user('d31f3f74-6fc0-41ae-b2f9-42eccd4f80b8'),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    )
]);

print 'count current participants: '. $participantsRemoveResponse->getCount();
```

Subject subscribers add
-----------------------

[](#subject-subscribers-add)

> **REQUIRED:** TeamToken

```
@var \Amo\Sdk\Service\SubjectService $subjectService */
$subscriberAddResponse = $subjectService->subscribersAdd([
    new ParticipantCollection(
        Participant::user('d31f3f74-6fc0-41ae-b2f9-42eccd4f80b8'),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    )
]);

print 'count current subscribers: '. $subscriberAddResponse->getCount();
```

Subject subscribers remove
--------------------------

[](#subject-subscribers-remove)

> **REQUIRED:** TeamToken

```
@var \Amo\Sdk\Service\SubjectService $subjectService */
$subscribersRemoveResponse = $subjectService->subscribersRemove([
    new ParticipantCollection(
        Participant::user('d31f3f74-6fc0-41ae-b2f9-42eccd4f80b8'),
        Participant::department('04469c3e-5f2e-11ec-bf63-0242ac130002'),
        Participant::accessList('0eba2bd6-5f2e-11ec-bf63-0242ac130002'),
        Participant::bot('124479fa-5f2e-11ec-bf63-0242ac130002'),
    )
]);

print 'count current subscribers: '. $subscribersRemoveResponse->getCount();
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance57

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

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

Every ~42 days

Recently: every ~248 days

Total

29

Last Release

438d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a13aade52ba8f698a1186c81a37f6ee66f2692a1fe6259f4840040b43f3e8f92?d=identicon)[ndhfs](/maintainers/ndhfs)

---

Top Contributors

[![amodmax](https://avatars.githubusercontent.com/u/121236365?v=4)](https://github.com/amodmax "amodmax (18 commits)")[![ndhfs](https://avatars.githubusercontent.com/u/13468916?v=4)](https://github.com/ndhfs "ndhfs (14 commits)")[![nnosemenov](https://avatars.githubusercontent.com/u/96250725?v=4)](https://github.com/nnosemenov "nnosemenov (7 commits)")[![jstHeng](https://avatars.githubusercontent.com/u/103441038?v=4)](https://github.com/jstHeng "jstHeng (6 commits)")[![dimaximenko](https://avatars.githubusercontent.com/u/48285612?v=4)](https://github.com/dimaximenko "dimaximenko (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/amo-tm-amosdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/amo-tm-amosdk-php/health.svg)](https://phpackages.com/packages/amo-tm-amosdk-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[ashallendesign/laravel-exchange-rates

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

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[allyans3/steam-market-api-v2

Steam Market API v2

1937.3k](/packages/allyans3-steam-market-api-v2)[specialtactics/l5-api

Dependencies for the Laravel API Boilerplate package

3672.8k2](/packages/specialtactics-l5-api)

PHPackages © 2026

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