Print_r( $result ) //!createBucket: ', $e->getMessage(), PHP_EOL time(), //! 'transient' //!createBucket( $post_buckets, null ) 'bucket_key' => 'adsk-forge-sdk-php-demo'. $apiInstance = new Autodesk\Forge\Client\Api\BucketsApi( $twoLeggedAuth ) For the API detail, please refer POST buckets and OSS Retention Policy. Now, before upload files/objects to the Data Management API, we must have to create a bucket of the Forge OSS (Object Storage Service) to store our files/objects firstly. 'expiry' => time() + $twoLeggedAuth->getExpiresIn(),Īfter retrieving access token, we can access Forge APIs to create buckets, upload files and do the model translation. 'accessToken' => $twoLeggedAuth->getAccessToken(), $twoLeggedAuth->setScopes( ) //!fetchToken() $twoLeggedAuth = new Autodesk\Auth\OAuth2\TwoLeggedAuth() Here is the sample for obtaining an access token from the OAuth API: require_once( './vendor/autoload.php' ) Īutodesk\Auth\Configuration::getDefaultConfiguration()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |