I tried to get token with my client_id and client_secret using this api https://api-sandbox.dwolla.com/token.
When I use postman for this api, I get a correct response like this.
Hi @Milos_Marinkovic, it looks like you are using our dwolla-v2-node SDK. In that case, you can instantiate a “Client” and start calling the API using that client like so:
const Client = require("dwolla-v2").Client;
const dwolla = new Client({
environment: "sandbox", // Defaults to "production"
key: process.env.DWOLLA_APP_KEY,
secret: process.env.DWOLLA_APP_SECRET
})
If you would like to continue using fetch, make sure that the client ID and secret are passed in as base64-encoded string client_id:client_secret to the Authorizatione header like so: