Javascript
import Finch from '@tryfinch/finch-api'; const client = new Finch(); const createAccessTokenResponse = await client.accessTokens.create({ code: '<your_authorization_code>' }); console.log(createAccessTokenResponse.account_id);
{ "access_token": "7e965183-9332-423c-9259-3edafb332ad2", "token_type": "bearer", "connection_id": "bc3a2af9-ce03-46c4-9142-81abe789c64d", "customer_id": "1234567890", "account_id": "ac3a2af9-ce03-46c4-9142-81abe789c64d", "client_type": "production", "company_id": "4ab15e51-11ad-49f4-acae-f343b7794375", "connection_type": "provider", "products": [ "directory", "employment", "individual" ], "provider_id": "gusto" }
Exchange the authorization code for an access token
Header used to specify the version for a given API request. Current version is 2020-09-17.
Used to indicate the original media type of the resource
Access Token
The response is of type object.
object
Was this page helpful?