Making Requests
To interact with the Dwolla API, all requests must include theAccept header:
Accept: application/vnd.dwolla.v1.hal+json
Content-Type:
Content-Type: application/vnd.dwolla.v1.hal+jsonContent-Type: application/json
API Host
Authentication
Dwolla uses the OAuth 2 protocol to authorize API requests. Every call to the Dwolla API must include a valid access token in theAuthorization header:
Authorization: Bearer {access_token}
Want to get up and running fast? The Quickstart walks through token generation and your first API call in under 5 minutes. This page covers the concepts in depth.
Creating an application
Before requesting an access token, register an application with Dwolla by logging in to the Dashboard and navigating to the applications page. Each application has aclient_id and client_secret (together, your client credentials) that identify it to the Dwolla API. The creates an application automatically when you sign up — see the Sandbox guide for details.
Dwolla’s authorization flow
OAuth 2 defines four main authorization grant types. Dwolla implements one: Application authorization — using the client credentials grant, your application obtains authorization to interact with the API on its own behalf. This is a server-to-server flow, also known as 2-legged OAuth.Requesting an access token
To obtain an access token, send aPOST to /token with an HTTP Basic Authorization header containing your Base64-encoded client credentials.
Authorization: Basic Base64(client_id:client_secret)
The request body must be form-encoded and include grant_type=client_credentials:
For the full endpoint specification — request/response schema, error codes, and an interactive playground — see the Create an application access token reference.
Token lifetime and refresh
Application access tokens expire one hour after they’re issued and are not paired with a refresh token. To continue making API calls, exchange your client credentials for a new token using the same request shown above. Official Dwolla SDKs handle token acquisition, caching, and renewal automatically — you only need to supply yourclient_id and client_secret at client initialization.
Using an access token
Pass the token as a Bearer credential on every authenticated request:401 with an InvalidAccessToken or ExpiredAccessToken error code. Catch these responses, request a fresh token, and retry the original call.