This is my code:
require get_stylesheet_directory() . ‘/vendor/autoload.php’;
include get_stylesheet_directory() . ‘/dwolla-swagger-php/DwollaSwagger.php’;
DwollaSwagger\Configuration::$username = ‘I’;
DwollaSwagger\Configuration::$password = ‘’;
$apiClient = new DwollaSwagger\ApiClient(“https://api-sandbox.dwolla.com”);
$customersApi = new DwollaSwagger\CustomersApi($apiClient);
That error looks like it’s saying you are lacking valid authentication credentials. It looks like you’re trying to call the sandbox api, have you set up a sandbox account in order to obtain you key and secret?
Hmm…looks like @devrentaraj does have the Sandbox credentials in his code. A 401 error usually means there’s something wrong with the request-body.
@devrentaraj, you should be able to catch the error and get the JSON response-body by wrapping the request in a try/catch and display the error response by calling the getResponseBody() method.
Hello @kmoreira,
Can I ask you to delete some accounts that I no longer need from my sandbox account? I can only change them to suspended and deactivate but I want to remove it completely from my account.
While you can deactivate and suspend a Customer, the functionality to delete a Customer isn’t supported as per the data retention guidelines that Dwolla is subject to within the USA.