GitHub - IntuitDeveloper/SampleApp-Project-Ruby: This is a sample app to test the Project API using Ruby.
Repository navigation
SampleApp-Project-RubyPublic
About
This is a sample app to test the Project API using Ruby.
Resources
Readme Apache-2.0 license Activity Custom propertiesStars
0 starsWatchers
0 watchingForks
0 forks Report repositoryBranches
Tags
Go to Branches page Go to Tags page
Latest commit
History
3 Commits
View commit history for this file.
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| app | app | ||
| bin | bin | ||
| config | config | ||
| public/ css | public/ css | ||
| .env-template | .env-template | ||
| .gitignore | .gitignore | ||
| .ruby-version | .ruby-version | ||
| Gemfile | Gemfile | ||
| Gemfile.lock | Gemfile.lock | ||
| LICENSE | LICENSE | ||
| NOTICE | NOTICE | ||
| README.md | README.md | ||
| Rakefile | Rakefile | ||
| config.ru | config.ru | ||
Repository files navigation
QuickBooks Sample Projects API app
This sample code will allow you to quickly connect to QB and test our Projects API.
Requirements
- IES QB production account
- com.intuit.quickbooks.accounting and project-management.project scopes
- OAuth credentials
Requirements
- Ruby 3.2+
Optional
- ngrok
Setup
-
Install Ruby and gems:
brew install rubybundle install
-
Production apps do not allow the use of localhost. If you do not have an internal non-localhost redirect url to work with this demo you can follow the steps below to get an ngrok account.
-
OptionaL: Install ngrok
- Create an account at this link: https://dashboard.ngrok.com/get-started/setup/macos
- Run this command in the terminal :
brew install ngrok - Run the following command to add you authtoken to the default
ngrok.yml configuration filethen run ngrok config add-authtoken <TOKEN-VALUE>- In the terminal run:
ngrok http 3000for this project or replace the 3000 with the port number of your choosing - You should now see a url in the Forwarding section in the terminal that starts with https and forwards to a local host adddress (https://234562f900c4.ngrok-free.app -> http://localhost:3000 ).
- Copy that url and paste in the QB_REDIRECT_URI in your .env file with /callback at the end as well as in your App's production redirect urls section
Environment variables
Change the .env-template file to .env and replace the following values before starting the server:
-
QB_CLIENT_ID
-
QB_CLIENT_SECRET
-
QB_REDIRECT_URI (example: https://ab4hfkjuiudf.ngrok-free.app/callback )
- If you are using ngrok the /callback will be missing from your app. Make sure you add the /callback in your .env file and your production redirect app url section here[link] and save for this to work. This step must be done after ngrok is started in order to receive the active url.
-
QB_ENVIRONMENT : production
- Only production apps are available for use with this API at this time
-
QB_BASE_URL (default https://quickbooks.api.intuit.com )
-
QB_GRAPHQL_URL (default https://qb.api.intuit.com/graphql )
-
QB_SCOPES (default: "com.intuit.quickbooks.accounting project-management.project")
-
QB_MINOR_VERSION (default: 75)
-
QB_DEEP_LINK_TEMPLATE (default: https://app.qbo.intuit.com/app/invoice?txnId=%s&companyId=%s )
Start the Rails server in a seperate terminal
bin/rails server -b 0.0.0.0 -p 3000
Running the Projects API
Navigate to your redirect url and follow the steps on the page to connect to your QB account, choose a customer, create an invoice and assign a project.
Endpoints
If you have any comments, questions or concerns please reach out to developer support [ correct title and name].
About
This is a sample app to test the Project API using Ruby.