PHPackages                             sofwar/trade-opskins-api - 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. sofwar/trade-opskins-api

ActiveLibrary[API Development](/categories/api)

sofwar/trade-opskins-api
========================

A Trade Opskins API client for PHP.

0.0.5(7y ago)123MITPHPPHP &gt;=7.1.0

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sofwar/trade-opskins-api)[ Packagist](https://packagist.org/packages/sofwar/trade-opskins-api)[ Docs](https://github.com/sofwar/trade-opskins-api)[ RSS](/packages/sofwar-trade-opskins-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Opskins Trade PHP Library
=========================

[](#opskins-trade-php-library)

[![Latest Stable Version](https://camo.githubusercontent.com/755cc5c0dba1eea260419504f60422da8bd8ea55af13ef48683a5d0449d6e757/68747470733a2f2f706f7365722e707567782e6f72672f736f667761722f74726164652d6f70736b696e732d6170692f762f737461626c65)](https://packagist.org/packages/sofwar/trade-opskins-api)[![Total Downloads](https://camo.githubusercontent.com/05ebb3cd6a5d6a29a46b1139fe2ab775cca5e66d563b76a79c4e8e3747590b58/68747470733a2f2f706f7365722e707567782e6f72672f736f667761722f74726164652d6f70736b696e732d6170692f646f776e6c6f616473)](https://packagist.org/packages/sofwar/trade-opskins-api)[![Latest Unstable Version](https://camo.githubusercontent.com/644e9b80d12a8a03d6b31859c36ea482bac0b8d775b2da65b5b3d3dda1f9b810/68747470733a2f2f706f7365722e707567782e6f72672f736f667761722f74726164652d6f70736b696e732d6170692f762f756e737461626c65)](https://packagist.org/packages/sofwar/trade-opskins-api)[![License](https://camo.githubusercontent.com/ca1459e82a8604aa82cdf571fb42a8474d8ea4c15215799d6e4932e8515e358e/68747470733a2f2f706f7365722e707567782e6f72672f736f667761722f74726164652d6f70736b696e732d6170692f6c6963656e7365)](https://packagist.org/packages/sofwar/trade-opskins-api)[![StyleCI](https://camo.githubusercontent.com/61abaee6e78523e98b5e98ad77267ee851bd2c8e9c3df1e5d33e51bb51b202e6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137303436353431392f736869656c64)](https://styleci.io/repos/170465419)

This is the unofficial client library for the [Opskins Trade API](https://github.com/OPSkins/trade-opskins-api). We provide an intuitive, stable interface to integrate Opskins Trade API into your PHP project.

Installation
------------

[](#installation)

Install the library using Composer. Please read the [Composer Documentation](https://getcomposer.org/doc/01-basic-usage.md) if you are unfamiliar with Composer or dependency managers in general.

```
composer require sofwar/trade-opskins-api

```

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

$opskins = new \SofWar\Opskins\Opskins();

```

Access Token
------------

[](#access-token)

You can use both a user access token and api key

```
ACCESS_TOKEN = XXXXXXXABH5IABYKNAAAABlcY8Lgurj5K+LRRA3UYeg2e3OQaXWLZC3OKXXrxjxCFof5YHQ=
ACCESS_TOKEN = xxxxb65b683xxde1553892d3b1xxx

```

Initialization
--------------

[](#initialization)

```
$opskins = new Opskins();
```

Also you can initialize Opskins with the default access token

```
$opskins = new Opskins('ACCESS_TOKEN');
```

OR

```
$opskins = new Opskins(');
$opskins->setAccessToken('ACCESS_TOKEN');
```

Authorization
-------------

[](#authorization)

The library provides the authorization flows for user based on OAuth 2.0 protocol implementation in Opskins API. Please read the full [documentation](https://docs.opskins.com/public/en.html#oauth) before you start.

### Authorization Code Flow

[](#authorization-code-flow)

For getting user access key use following command:

```
$client_id = 'XXXXX';
$client_secret = 'XXXXXXXXXXXX';

$oauth = new \SofWar\Opskins\OpskinsOAuth($client_id, $client_secret);

$state = 'secret_state_code';

$browser_url = $oauth->getAuthorizeUrl($state, ['identity_basic', 'items']);
```

After successful authorization user's browser will be redirected to the specified redirect\_uri. Meanwhile the code will be sent as a GET parameter to the specified address:

```
https://example.com?code=CODE&state=STATE

```

Then use this method to get the access token:

```
$client_id = 'XXXXX';
$client_secret = 'XXXXXXXXXXXX';

$oauth = new \SofWar\Opskins\OpskinsOAuth($client_id, $client_secret);

$response = $oauth->getAccessToken($_GET['code']);

$access_token = $response['access_token'];
```

API Request
-----------

[](#api-request)

You can find the full list of Opskins Trade API methods [here](https://github.com/OPSkins/trade-opskins-api).

Examples
--------

[](#examples)

All examples can be found [here](https://github.com/sofwar/trade-opskins-api/tree/master/examples)

TODO
----

[](#todo)

- ICase
    - GetCaseSchema
    - GetCaseOdds
    - GetMinimumOpenVolume
    - OpenWithKeys
- ICaseSite
    - GetKeyCount
    - GetTradeStatus
    - SendKeyRequest
    - UpdateCommissionSettings
- IEthereum
    - GetContractAddress
- IItem
    - GetAllItems
    - GetItemsById
    - WithdrawToOpskins
    - GetItemDefinitions
    - GetRarityStats
    - InstantSellRecentItems
- ITest
    - Test
    - TestAuthed
    - TestBody
- ITrade
    - AcceptOffer
    - CancelOffer
    - GetApps
    - GetOffer
    - GetOffers
    - GetTradeURL
    - GetUserInventory
    - GetUserInventoryFromSteamId
    - RegenerateTradeUrl
    - SendOffer
    - SendOfferToSteamId
- IUser
    - CreateVCaseUser
    - GetInventory
    - GetProfile
    - UpdateProfile
    - UserReports

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~0 days

Total

5

Last Release

2646d ago

### Community

Maintainers

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

---

Top Contributors

[![sofwar](https://avatars.githubusercontent.com/u/7130905?v=4)](https://github.com/sofwar "sofwar (15 commits)")

---

Tags

apiskinsopskinsop skinsopskins-apitrade-api

### Embed Badge

![Health badge](/badges/sofwar-trade-opskins-api/health.svg)

```
[![Health](https://phpackages.com/badges/sofwar-trade-opskins-api/health.svg)](https://phpackages.com/packages/sofwar-trade-opskins-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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