Problem finding our own account url, sandbox works, prod doesn't!

(Gastón Avila) #1

According to I should be getting the account_url for my own account using a snippet like this:

import dwollav2
client = dwollav2.Client(
application_token = client.Auth.client()
res = application_token.get('')
account = res.body
account_url = account['_links']['account']['href']

The response on production does not have the account key in the response object.

This works perfectly on sandbox but not on production and we are finding this very frustrating.
Could anyone on the official support give me an answer on this please?

(Spencerhunter) #2

@Gaston_Avila, a client token (aka application access token) can only be used to call resources that belong to the application itself which includes Webhooks, Webhook Subscriptions, and Events. The only exception to this is if you’re integrating with our white labeled Access API. If you’re an Access API partner then an application access token can be used to call resources that belong to the app as well as the Account that “owns” the application.

The reason you’re seeing the Account link get returned in the Sandbox is that by default all applications in the Sandbox are enabled with a private scope called ManageCustomers which determines if you can call resource that belong to the app as well as the account that the app belongs to.

If you’re integrating with our Access API then this is the correct method to obtain authorization for your app and account.

If you’re integrating with our Transfer solution and want to call the API on your own account’s behalf then you’ll need to implement the 3-legged OAuth flow and obtain an access token for your own user account. The alternative to going through the OAuth flow with your own account would be to generate a token for your own account as described in this article.

RootApi not returning account in "_links"
(Matt Glaman) #3

I had the same issue. I had to manually set the destination to our primary account.

  $payload = [
'_links' => [
  'source' => [
    'href' => $funding_source,
  'destination' => [
    'href' => '',
'amount' => [
  'currency' => $charge['currency_code'],
  'value' => commerce_currency_amount_to_decimal($charge['amount'], $charge['currency_code']),


(Gastón Avila) #4

That is a very confusing way to set up a sandbox I would say. I expect that whatever I do in the sandbox works when I set up my production account.

All we do is use dwolla for transfers from our account to contractors. We need to find out own account_url to get our funding sources so we can set the source attribute on the transfer. None of this requires an account_token in the sandbox environment, while it does on production.

(Gastón Avila) #5

We tried that but we are also prevented from sending transfers without having our account_token.

(Spencer Hunter) #6

@Gaston_Avila, We appreciate the feedback and apologize for the confusion. It’s something we’re actively working on providing a better experience on with regards to the Sandbox. Since you’re only initiating payouts for your own Dwolla account then you’ll only need an account token for all calls in the API.