Dwolla swagger Uncaught exception 'DwollaSwagger\ApiException' with message '[404] Error connecting to the API

(Dhara bhatia) #1

Hi ,

When I create the customer or get the list of customer using dwoall swagger API then its throw me following error

Fatal error: Uncaught exception ‘DwollaSwagger\ApiException’ with message ‘[404] Error connecting to the API (https://api-uat.dwolla.com/customers/customers)’ in /opt/lampp/htdocs/dwollaswagger/vendor/dwolla/dwollaswagger/lib/ApiClient.php:308 Stack trace: #0 /opt/lampp/htdocs/dwollaswagger/vendor/dwolla/dwollaswagger/lib/CustomersApi.php(168): DwollaSwagger\ApiClient->callApi(’/customers’, ‘POST’, Array, Array, Array, Array) #1 /opt/lampp/htdocs/dwollaswagger/vendor/customer.php(12): DwollaSwagger\CustomersApi->create(Array) #2 {main} thrown in /opt/lampp/htdocs/dwollaswagger/vendor/dwolla/dwollaswagger/lib/ApiClient.php on line 308

Code I have written


DwollaSwagger\Configuration::$access_token = ‘’;

$apiClient = new DwollaSwagger\ApiClient(“https://api-uat.dwolla.com/customers”);
$customersApi = new DwollaSwagger\CustomersApi($apiClient);
$new_customer = $customersApi->create([
‘firstName’ => ‘Bob’,
‘lastName’ => ‘Merchant’,
‘email’ => ‘bob.Merchant@yopmail.com’


(Skyler Nesheim) #2

Please change

$apiClient = new DwollaSwagger\ApiClient("https://api-uat.dwolla.com/customers");


$apiClient = new DwollaSwagger\ApiClient("https://api-uat.dwolla.com");

and try again. You don’t need to provide the path to the resource, the swagger client handles that.

(Dhara bhatia) #3

Hi Skyler,

Thanks for your response.

I have made the changes as you suggested but its still throwing same error. Its there any setting I need to do in Dwolla swagger apart from access token i have enter on page.

(Spencer Hunter) #4

@dharabhatia, Would you be able to create a gist and show us what you have so far? (Feel free to omit your access token and any private information)

(Dhara bhatia) #5

Hi Spencer,

Ok I will share my code after some days whatever I have did. I have raise one another question and bug if you help me out with it then I am really thankful to you.

(Cory Anderson) #6

(Cory Anderson) #7

(Cory Anderson) #8