Retrieves the authenticated user's account profile information. It can be used to let users log into your app or site using eBay, which frees you from needing to store and protect user's PII (Personal Identifiable Information) data.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: v1.0.0
- Package version: 1.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/minotaurlogistics/ebay-identity-api.git"
}
],
"require": {
"minotaurlogistics/ebay-identity-api": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
docker run --rm -v ${PWD}:/codegen/SwaggerClient-php swaggerapi/swagger-codegen-cli generate \
-i https://developer.ebay.com/api-docs/master/commerce/identity/openapi/2/commerce_identity_v1_oas2.json \
-o /codegen \
-l php \
--git-user-id minotaurlogistics --git-repo-id ebay-identity-api \
--invoker-package 'Swagger\EbayIdentityClient' \
--artifact-version 1.0 \
--api-package 'GeneratedApi'
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Swagger\EbayIdentityClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\EbayIdentityClient\Api\UserApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getUser();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://apiz.ebay.com/commerce/identity/v1
Class | Method | HTTP request | Description |
---|---|---|---|
UserApi | getUser | GET /user/ |
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://auth.ebay.com/oauth2/authorize
- Scopes:
- https://api.ebay.com/oauth/api_scope/commerce.identity.email.readonly: View a user's personal email information from their eBay member account
- https://api.ebay.com/oauth/api_scope/commerce.identity.address.readonly: View a user's personal address information from their eBay member account
- https://api.ebay.com/oauth/api_scope/commerce.identity.readonly: View a user's basic information, such as username or business account details, from their eBay member account
- https://api.ebay.com/oauth/api_scope/commerce.identity.name.readonly: View a user's first and last name from their eBay member account
- https://api.ebay.com/oauth/api_scope/commerce.identity.phone.readonly: View a user's personal telephone information from their eBay member account