Configuring Authentication

To access PayPal data stores, you must authenticate the connection using the OAuth 2.0 protocol. You can do this by providing a valid access token, or by providing your PayPal application information so that the connector initiates an OAuth 2.0 authentication flow to retrieve and use the corresponding access token.

Using an Access Token

If you already have a valid access token, you can authenticate your connection by providing the token in the connection URL.

To authenticate using an access token:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:paypal://localhost;Host=[InstanceURL];Auth_Type=OAuth 2.0;Auth_AccessToken=[YourAccessToken];

    The variables are defined as follows:

  • [InstanceURL] is the URL of your PayPal instance.
  • [YourAccessToken] is your access token for authenticating to PayPal.

For example:

jdbc:paypal://localhost;Host=api.sandbox.paypal.com;Auth_Type=OAuth 2.0;Auth_AccessToken=1b3d5f7h8j0sampletoken;

Using PayPal Application Information

You can configure the connector to retrieve and use an access token based on your PayPal application information. To do this, in the connection URL, provide the client ID and secret associated with your PayPal application.

To authenticate using PayPal application information:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:paypal://localhost;Host=[InstanceURL];Auth_Type=OAuth 2.0;Auth_Client_ID=[YourClientID];Auth_Client_Secret=[YourClientSecret];

    The variables are defined as follows:

  • [InstanceURL] is the URL of the PayPal instance that you are connecting to.
  • [YourClientID] is the client ID associated with your PayPal application.
  • [YourClientSecret] is the client secret associated with your PayPal application.

For example:

jdbc:paypal://localhost;Host=api.sandbox.paypal.com;Auth_Type=OAuth 2.0;Auth_Client_ID=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;Auth_Client_Secret=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;