Note that QuickBooks may revoke refresh token after 24 hours, and the application needs to obtain a new token. dotConnect for QuickBooks can automatically obtain new OAuth 2.0 tokens and store them between sessions. For this, you need to set the Devart.Data.SqlShimConnectionStringBuilder.TokenServer parameter that determines the location to store the refresh tokens.
The refresh token can be obtained automatically by logging into QuickBooks via QuickBooksConnection design-time editor or by creating a connection in Visual Studio Server Explorer. Alternatively you may use QuickBooks OAuth 2.0 Playground to obtain the initial refresh token.