PHPackages                             exsio/autodesk-forge-client - 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. exsio/autodesk-forge-client

ActiveLibrary[API Development](/categories/api)

exsio/autodesk-forge-client
===========================

0.2(9mo ago)02.4kApache-2.0PHPPHP &gt;=5.4

Since Jun 24Pushed 9mo agoCompare

[ Source](https://github.com/eXsio/forge-php-client)[ Packagist](https://packagist.org/packages/exsio/autodesk-forge-client)[ Docs](https://github.com/Autodesk-Forge/forge-php-client)[ RSS](/packages/exsio-autodesk-forge-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

UNSUPPORTED
===========

[](#unsupported)

Forge PHP SDK
=============

[](#forge-php-sdk)

*Forge API*: [![oAuth2](https://camo.githubusercontent.com/f30ac084fd6e5320e51b0d22920d8297e61d7fe3f4c8e850c71a6138efc3d6b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f41757468322d76312d677265656e2e737667)](http://autodesk-forge.github.io/)[![Data-Management](https://camo.githubusercontent.com/ec87a5669abfa0cacb74f89bc43378443c8ab32676538590badd31daaef1b097/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446174612532304d616e6167656d656e742d76312d677265656e2e737667)](http://autodesk-forge.github.io/)[![OSS](https://camo.githubusercontent.com/c7bed7ba5938716c20759ba631cec543b2a1d5594bb40ea9f7b1c98b6abaa3c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f53532d76322d677265656e2e737667)](http://autodesk-forge.github.io/)[![Model-Derivative](https://camo.githubusercontent.com/56b4e4a4c58b5eafc5f3070f75df15f7ae26450759a6b53aea9301621c3ef054/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c253230446572697661746976652d76322d677265656e2e737667)](http://autodesk-forge.github.io/)

Overview
--------

[](#overview)

This [PHP](http://php.net/) SDK enables you to easily integrate the Forge REST APIs into your application, including [OAuth](https://developer.autodesk.com/en/docs/oauth/v2/overview/), [Data Management](https://developer.autodesk.com/en/docs/data/v2/overview/), [Model Derivative](https://developer.autodesk.com/en/docs/model-derivative/v2/overview/), and [Design Automation](https://developer.autodesk.com/en/docs/design-automation/v2/overview/).

### Requirements

[](#requirements)

- PHP version 5.4.0 and above.
- A registered app on the [Forge Developer portal](https://developer.autodesk.com/myapps).

### Installation

[](#installation)

#### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), run:

```
composer require autodesk/forge-client

```

#### Manual Installation

[](#manual-installation)

Download the files and include `autoload.php`:

```
require_once('/path/to/ForgeClient/autoload.php');
```

Tutorial
--------

[](#tutorial)

Follow this tutorial to see a step-by-step authentication guide, and examples of how to use the Forge APIs.

### Create an App

[](#create-an-app)

Create an app on the Forge Developer portal. Note the client ID and client secret.

### Authentication

[](#authentication)

This SDK comes with an [OAuth 2.0](https://developer.autodesk.com/en/docs/oauth/v2/overview/) client that allows you to retrieve 2-legged and 3-legged tokens. It also enables you to refresh 3-legged tokens. The tutorial uses 2-legged and 3-legged tokens for calling different Data Management endpoints.

#### 2-Legged Token

[](#2-legged-token)

This type of token is given directly to the application.

To get a 2-legged token run the following code. Note that you need to replace `your-client-id` and `your-client-secret` with your [app](https://developer.autodesk.com/myapps)'s client ID and client secret.

```
