QuickBooks Online connection strings contain the essential parameters to establish a reliable connection to QuickBooks Online, enabling secure communication between your application and QuickBooks. This guide will walk you through the key components of dotConnect for QuickBooks Online connection strings, and demonstrate how to construct and use them.

QuickBooks online connection strings

The following code snippet is used to create a new connection to a QuickBooks Online account. Make sure to replace the placeholders with your actual credentials.

using Devart.Data.QuickBooks;
...
string connectionString = "Authentication Type=OAuthInteractive;License key=**********;";

Basic connection properties

The following table lists the valid names for values within the QuickBooks Online connection strings.

Name Description
Authentication Type Authentication method to use. The supported types are Refresh Token, Access Token, and OAuthInteractive
Company Id Unique identifier for a QuickBooks company
Access Token QuickBooks OAuth 2.0 access token
Client Id One of the two OAuth 2.0 credentials obtained when the application is registered
Client Secret The second part of the two OAuth 2.0 credentials
License Key License key that should be specified in the connection string

Advanced connection properties

The following table lists the valid parameter names used in the QuickBooks Online connection strings.

Name Description
Token Server Stores refresh tokens between sessions and automatically refreshes expired access tokens
Refresh Token OAuth 2.0 refresh token used to obtain new access tokens
NormalizeDbNames Performs the normalization of database names
Connection Timeout Time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 15
Default Command Timeout Time (in seconds) to wait for execution of a command before terminating the attempt and generating an error. 0 indicates no limit
Failover Retries Number of retries to execute a command if it fails because of the exception. It indicates that the reason for the failure may be temporary
Local SQL Engine Enables local SQL processing, allowing more standard SELECT statement features
Readonly Determines whether the connection is read-only (allows only SELECT statements)
UserAgent Sets the value of the User-Agent HTTP header
UTC Dates Indicates whether all datetime values retrieved from the data source are returned as UTC values or converted to local time. Also, it indicates whether date values specified on the application side (for example, in SQL statements) are considered UTC or local. The default value is false
Sandbox Determines whether to connect to the sandbox environment in QuickBooks
Connection Lifetime Compares the connection creation time with the current time when a connection is returned to the pool. The connection is closed if that time span (in seconds) exceeds the value specified by Connection Lifetime. The default value is 0 (connection always returns to the pool)
Max Pool Size Maximum number of connections allowed in the pool. The default value is 100. Note that setting the Max Pool Size value of the ConnectionString can affect performance
Min Pool Size Minimum number of connections allowed in the pool. The default value is 0
Pooling Determines whether the provider retrieves a QuickBooksConnection object from the appropriate pool or creates a new one. The default value is true
Initialization Command Specifies a data source-specific command that should be executed immediately after establishing the connection
Run Once Command Command to execute when the connection is opened the first time. It is not executed when the connection is taken from the pool
Proxy Host Hostname or IP address of the proxy server
Proxy Port Port number of the proxy server. The default value is 3128
Proxy User Account name of the proxy server
Proxy Password Password for the proxy server account
Persist Security Info Indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been open

Conclusion

QuickBooks Online is a widely used platform and a common data source for many business applications, especially those built with C# and .NET. Since reliable data connectivity is essential for stable application performance, it is important to configure the connection correctly and automate interaction with the service whenever possible. This article explains the parameters used in QuickBooks Online connection strings and provides a code example that demonstrates how to establish a connection.

To simplify tasks such as connecting to the data source, retrieving data, and performing data operations, you can use Devart's dotConnect solutions. dotConnect is a family of powerful ADO.NET data providers that allow developers to connect to various data sources and work with data directly without requiring additional client libraries.

If you are working with QuickBooks Online, use dotConnect for QuickBooks to establish connections quickly and reliably. A fully functional free trial is available for 30 days, so feel free to test it with your actual workload.

Dereck Mushingairi

I'm a technical content writer who loves turning complex topics — think SQL, connectors, and backend chaos–into content that actually makes sense (and maybe even makes you smile). I write for devs, data folks, and curious minds who want less fluff and more clarity. When I'm not wrangling words, you'll find me dancing salsa, or hopping between cities.

Try the 30-day trial of the full product. No limits. No card required. Start free trial