Skip to content

Instantly share code, notes, and snippets.

@dan-palmer
Created January 2, 2024 11:16
Show Gist options
  • Save dan-palmer/d55f5309d89f2db9b77ae148f701037e to your computer and use it in GitHub Desktop.
Save dan-palmer/d55f5309d89f2db9b77ae148f701037e to your computer and use it in GitHub Desktop.
Node Axios Teller Client Example
const fs = require('fs');
const https = require('https');
const axios = require('axios');
const httpsAgent = new https.Agent({
cert: fs.readFileSync('/path/to/your/certificate.pem'),
key: fs.readFileSync('/path/to/your/private_key.pem'),
});
const username = "token_foobarbaz" // the authorization token returned by Teller Connect
const config = { auth: {username: username}, httpsAgent: httpsAgent };
axios
.get('https://api.teller.io/accounts', config)
.then(response => { console.log(response) })
.catch(error => { console.error('Error: ', error) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment