PHPackages                             ups-api/php-widget-sdk - 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. ups-api/php-widget-sdk

ActiveLibrary[API Development](/categories/api)

ups-api/php-widget-sdk
======================

 This SDK will help you generate the access token using PHP . Using this access token you will be able to connect to widgets supported by UPS.

1.1.0(2y ago)61093[1 PRs](https://github.com/UPS-API/Widgets-SDK/pulls)MITPHP ^8.0

Since Dec 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/UPS-API/Widgets-SDK)[ Packagist](https://packagist.org/packages/ups-api/php-widget-sdk)[ RSS](/packages/ups-api-php-widget-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Widgets-SDK
===========

[](#widgets-sdk)

This repository will host SDKs that help you generate an OAuth Token to use with Widgets developed by UPS.

FAQ
---

[](#faq)

> Which technologies are supported by UPS?

- UPS currently has developed SDKs for .Net (6.0) and GO Lang. A script for PHP is also available.

> How does my team use your SDK?

- Find your supported technology in the [branches](https://github.com/UPS-API/Widgets-SDK/branches) section. Follow the instructions in the ReadMe for your specific implementation.

> How long does a token last?

- A successfully created token is valid for four(4) hours. Within the token, there is a property called `exp` which can be used to calculate remaining time.

> What does a token look like?

- A valid token is represented by an encoded string of random characters (max 1000).

> How do I create a token?

- The SDKs expose `generateToken()` which can be used to get a token. `generateToken()` requires two strings: `clientId` and `clientSecret`. Other configurable parameters include `headers`, `postData`, and `queryParams`.

> How do I get a Client Id and a Client Secret?

- Register on the [UPS Developer Portal](https://developer.ups.com/). Follow the steps to onboard and get an id and secret.

Response Specification
----------------------

[](#response-specification)

### Successful Token Generation

[](#successful-token-generation)

A valid and successful response will return an OAuth access token.

`{ eyJhZGRyZXNzZXMiOlt7InN0cmVldCI6IjEyMzgw... }`

### Failed Token Generation

[](#failed-token-generation)

An invalid or erroneous response will throw an exception. The exception will contain a message with an error code and a message with information.

#### Errors

[](#errors)

Error CodeCauseSolutionDTG001Invalid Client IdEnsure the correct Client Id is provided as a `string`.DTG002Missing Client IdEnsure a Client Id is provided when calling `GenerateToken()`.DTG003Invalid Client CredentialsEnsure the Client Id and Secret are correct and provided as a `string`.DTG008Quota Limit ExceededThe quota for generating tokens within the given timeframe has been exceeded. Please wait before generating more tokens.#### Error Example

[](#error-example)

`{ "response": { "errors": [ { "code":"DTG001", "message":"Token generation has encountered an error. Please contact your UPS Relationship Manager." } ] } }`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.6% 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

Unknown

Total

1

Last Release

881d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f1ce454f02b222c0280661d37fd52e6e7d5fb48881d7b074750a69d19189275?d=identicon)[upsprasad](/maintainers/upsprasad)

---

Top Contributors

[![UPSMichael](https://avatars.githubusercontent.com/u/142532921?v=4)](https://github.com/UPSMichael "UPSMichael (16 commits)")[![upsprasad](https://avatars.githubusercontent.com/u/135872027?v=4)](https://github.com/upsprasad "upsprasad (6 commits)")[![upsseemagadekar](https://avatars.githubusercontent.com/u/135866662?v=4)](https://github.com/upsseemagadekar "upsseemagadekar (1 commits)")

---

Tags

apisdkaccess tokenups

### Embed Badge

![Health badge](/badges/ups-api-php-widget-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ups-api-php-widget-sdk/health.svg)](https://phpackages.com/packages/ups-api-php-widget-sdk)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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