JDBC Driver for eBay Analytics

Build 22.0.8462

Custom Credentials

Desktop Authentication with your OAuth App

Follow the steps below to authenticate with the credentials for a custom OAuth app. See Creating a Custom OAuth App for instructions on how to create a custom oauth application.

Authenticate to eBay Analytics from a Desktop Application

After setting the following, you are ready to connect:

  • OAuthClientId: Set this to the App ID (Client ID) from your key set.
  • OAuthClientSecret: Set this to the Cert ID (Client Secret) from your key set.
  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • RuName: Set this to the Redirect URL name of the OAuth App in the 'Application access' section.
  • (Optional) CallbackURL: Set this to a local Redirect URL (ex. http://localhost:33333) in case your OAuth App's auth accepted URL is set to https://oauth.cdata.com/oauth/ or to the actual one in case you are using another redirect URL.
  • (Optional) UseSandbox: Set this to True if you are connecting to the Sandbox environment.

When you connect, the driver opens the OAuth or Auth and Auth endpoint in your default browser. Log in and grant permissions to the application. The driver then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Obtains a new access token when the old one expires.
  3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Authenticate to eBay Analytics from a Web Application

In the Web OAuth flow, set the following connection properties and follow the steps below to call stored procedures to obtain the access token.

  • OAuthClientId: Set this to the App ID (Client ID) in your app settings.
  • OAuthClientSecret: Set this to the Cert ID (Client Secret) in your app settings.
  • RuName: Set this to the Redirect URL name of the OAuth App in the Application access section.
  • (Optional) UseSandbox: Set this to True if you are connecting to the Sandbox environment.

When connecting via a Web application, or if the driver is not authorized to open a browser window, you need to exchange a verifier code for the OAuthAccessToken.

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the AuthMode input to WEB and set the CallbackURL input to the auth accepted URL you specified in your app settings. If necessary, set the Scope parameter to request custom scopes.

    The stored procedure returns the URL to the OAuth endpoint.

  2. Go to that URL and log in to authorize the application. Afterwards, you are redirected back to the callback URL.

    When you are redirected, the callback URL contains the code query string parameter.

  3. Call the GetOAuthAccessToken stored procedure. Set the AuthMode input to WEB. Set the Verifier input to the "code" parameter in the query string of the callback URL. If necessary, set the Scope parameter to request custom scopes.

    NameValue
    AuthModeWEB
    VerifierSet this to the verifier code.

To make requests to eBay Analytics, set OAuthAccessToken to the values returned in step 3.

To automatically refresh the token when it expires, set InitiateOAuth to REFRESH.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462