![]() ' For example, ' in C#: (url) ' in Java: Desktop.getDesktop().browse(new URI(url)) ' in VBScript: Set wsh=WScript.CreateObject("WScript.Shell") ' wsh.Run url ' in Xojo: ShowURL(url) (see ) ' in Dataflex: Runprogram Background "c:\Program Files\Internet Explorer\iexplore.exe" sUrl ' in dBASE: run(false, 'rundll32 url.dll,FileProtocolHandler "' + lcUrl + '"') ' The QuickBooks account owner would interactively accept or deny the authorization request. ' At this point, your application should load the URL in a browser. This returns a URL that should be loaded in a browser. Scope = "" ' Begin the OAuth2 three-legged flow. Possible scopes that can appear in the list are: ' : QuickBooks Online API ' : QuickBooks Payments API ' openid: OpenID Connect processing ' profile: user's given and family names ' email: user's email address ' phone: user's phone number ' address: user's physical address CodeChallenge = False ' Indicate the desired access. ClientSecret = "QUICKBOOKS-CLIENT-SECRET" TokenEndpoint = "" ' Replace these with actual values. ' For example, in PHP your script would look like this: ' ![]() It must include the query string in the redirection. ' For a desktop app, you must provide a script on your web server to redirect to " ' It can be written in C#, PHP, or whatever desired. Dim oauth2 As New Chilkat.OAuth2 Dim success As Boolean ' QuickBooks OAuth2 allows for an " callback URL for sandbox testing, ' but not for production. Afterwards it can be ' repeatedly refreshed without user interaction, as shown in this example: Refresh Quickbooks OAuth2 Access Token. ![]() ' This is the way to initially obtain the OAuth2 access token. ![]() ' This is explained in the comments below. ' You'll need to add a line (or a few lines of code) to popup a web browser that navigates to a URL. ![]() ' See How to Create an App in QuickBooks Developer Dashboard ' - ' This example is for desktop applicatons (it is not for code that runs on a web server). ' - ' IMPORTANT: You first need to define an App in the Quickbooks Developer Dashboard. ' See Global Unlock Sample for sample code. ' This example requires the Chilkat API to have been previously unlocked. (VB.NET) Quickbooks OAuth2 in a Desktop AppÄemonstrates how to get a QuickBooks OAuth2 access token from a desktop application or script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |