w3lifer / ebay-oauth-token
1.0.0
2018-10-19 16:03 UTC
Requires
- php: >=5.6
- dts/ebay-sdk-php: ^18.0
This package is auto-updated.
Last update: 2024-10-26 18:17:31 UTC
README
Installation
composer require w3lifer/ebay-oauth-token
Usage
use w3lifer\EbayOAuthToken; $ebayOAuthToken = new EbayOAuthToken([ 'absPathToFileToStoreUserAccessRefreshToken' => __DIR__ . '/ebay-oath-refresh-token', // Required, string 'credentials' => EBAY_CREDENTIALS['production']['credentials'], // Required, array 'ruName' => EBAY_CREDENTIALS['production']['ruName'], // Required, string // An authorization code is not required to generate an application access token. // It is used once to a store long-lived refresh token when we generate a user access token. // https://developer.ebay.com/api-docs/static/oauth-tokens.html // 'authorizationCode' => '<authorization-code>', // Optional 'prod' => true, // Optional ("sandbox" environment will be used by default) ]); $applicationAccessToken = $ebayOAuthToken->getApplicationAccessToken(); $userAccessToken = $ebayOAuthToken->getUserAccessToken();