Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Pipedrive consists of three basic steps:
- Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.pipedrive.PipedriveDriver
- Provide the JDBC URL. For example:
jdbc:pipedrive:AuthScheme=Basic;CompanyDomain=MyCompanyDomain;APIToken=MyAPIToken; or jdbc:cdata:pipedrive:AuthScheme=Basic;CompanyDomain=MyCompanyDomain;APIToken=MyAPIToken;
The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:pipedrive:" or "jdbc:cdata:pipedrive:" and can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to PipeDrive
There are several authentication methods available for connecting to Pipedrive: Basic and OAuth.
Basic
Begin by obtaining an API token:- Click on the the account name (on the top right) on PipeDrive.
- Click on Company Settings, Then Click on Personal Preferences -> API -> Generate Token.
- Note the API token.
- Note the CompanyDomain ,which is visible in the PipeDrive HomePage URL.
Set the following to authenticate to Pipedrive
- APIToken: Set to the noted API token.
- CompanyDomain: Set to the noted company domain from the developer sandbox URL.
- AuthScheme: Set to 'Basic'.
OAuth
If you do not have access to the user name and password or do not want to require them, use the OAuth user consent flow. See Using OAuth Authentication for an authentication guide.