This API Quickstart guide will help you send your first request to Chart, the unified API for tax records.
client_id
and client_secret
to build and test how Chart works using simulated data.
client_id
and client_secret
will only work for the sandbox provider.
If you would like to test real providers with live data, you must request developer keys from
developers@trychart.com.code
and exchanging it for an access_token
, which can be
used to subsequently call our APIs. In a true production environment, you will
want to automate this process completely inside your application’s code.redirect_uri
is set up before continuing or
our authorization code generation will fail.
In your Chart Dashboard, go to the “Redirect URIs”
section and select + Add Redirect URI
. We are going to use https://example.com for testing purposes.
In production, you will want to use your own application’s urls for the Redirect Uris
(and remove all mentions of https://example.com or http://localhost).
Redirect URIs are only needed if you are redirecting to Chart Connect.
If you decide to use our embedded Chart Connect flow, you do not need to specify a redirect_uri
;
the SDK does this for you.
We will launch Chart Connect - our secure authorization flow
for your users to grant your application access to their systems - by constructing and navigating
to the following URL on your browser. Copy the url below, open up your favorite text editor
(Notes, TextEdit, VS Code, etc), paste, and replace <your_client_id>
with the client id found
in your Chart Dashboard.
Remove the angle brackets when replacing <your_client_id>
.
https://example.com
with the query parameter code
in the browser URL. Copy the code
from the url and save it in your text editor.
In a production system, however, the browser will redirect to your url and
your application will automatically copy the code
and perform the remaining steps programmatically.
To exchange the code
for a token, we use the curl command below. Copy the code below,
paste into your text editor, replace the <your_authorization_code>
in the command with the one
you saved above (making sure to not include the angle brackets).