Created
January 2, 2024 11:16
-
-
Save dan-palmer/d55f5309d89f2db9b77ae148f701037e to your computer and use it in GitHub Desktop.
Node Axios Teller Client Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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