My sandbox test application isn’t functioning as your docs lead me to believe it will.
This code…
const dwolla = require('dwolla-v2');
const appKey = 'REDACTED';
const appSecret = 'REDACTED';
const client = new dwolla.Client({
key: appKey,
secret: appSecret,
environment: 'sandbox', // optional - defaults to production
grant_type: 'client_credentials'
});
await client.auth.client()
.then(function(appToken) {
return appToken.get('webhook-subscriptions');
})
.then(function(res) {
sails.log(JSON.stringify(res.body));
});
…is supposed to give me a JSON response with my access_token (per https://docs.dwolla.com/#application-authorization). Instead, I’m getting this response:
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/webhook-subscriptions",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "webhook-subscription"
}
},
"_embedded": {
"webhook-subscriptions": []
},
"total": 0
}
What is going on?