Skip to main content
POST
/
token
cURL
POST https://api-sandbox.dwolla.com/token
Authorization: Basic YkVEMGJMaEFhb0pDamplbmFPVjNwMDZSeE9Eb2pyOUNFUzN1dldXcXUyeE9RYk9GeUE6WEZ0bmJIbXR3dXEwNVI1Yk91WmVOWHlqcW9RelNSc21zUU5qelFOZUFZUlRIbmhHRGw=
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
// Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-node
// This example assumes you've already initialized the client. Reference the SDKs page for more information: https://developers.dwolla.com/sdks-tools
client.auth
.client()
.then(function (appToken) {
return appToken.get("/");
})
.then(function (res) {
console.log(JSON.stringify(res.body));
});
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
// This example assumes you've already initialized the client. Reference the SDKs page for more information: https://developers.dwolla.com/sdks-tools
app_token = client.Auth.client()
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
// This example assumes you've already intialized the client. Reference the SDKs page for more information: https://developers.dwolla.com/sdks-tools
$tokensApi = new DwollaSwagger\TokensApi($apiClient);
$appToken = $tokensApi->token();

DwollaSwagger\Configuration::$access_token = $appToken->access_token;
?>
# Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby
// This example assumes you've already initialized the client. Reference the SDKs page for more information: https://developers.dwolla.com/sdks-tools
app_token = $dwolla.auths.client
# => #<DwollaV2::Token client=#<DwollaV2::Client id="..." secret="..." environment=:sandbox> access_token="..." expires_in=3600 scope="...">
{
  "access_token": "gTm0p62yYXFiB1rOdhV0TsNOinC2V2P1CMaAtojkO9JEGbv3i5",
  "token_type": "Bearer",
  "expires_in": 3599
}
{
"error": "invalid_client"
}

Body

application/x-www-form-urlencoded

OAuth get token request. Client credentials are sent in the Authorization header using Basic authentication.

grant_type
enum<string>
required

Must be set to "client_credentials"

Available options:
client_credentials
Example:

"client_credentials"

Response

successful operation

access_token
string
required

A new access token that is used to authenticate against resources that belong to the app itself.

Example:

"gTm0p62yYXFiB1rOdhV0TsNOinC2V2P1CMaAtojkO9JEGbv3i5"

token_type
string
required

The type of token, always "Bearer"

Example:

"Bearer"

expires_in
integer
required

The lifetime of the access token, in seconds. Default is 3600.

Example:

3599