The supplied credentials are not authorized for this resource

Hello Dwolla team - I am getting an error where my production credentials say:

"error": "invalid_client"

But if I switch things to sandbox and use those credentials, I get the token just fine. This issue is occurring for both the SDK and raw requests. This is also seem to affect my unverified customer creation as this code:

dwollav2.error.ForbiddenError: {"code":"Forbidden","message":"The supplied credentials are not authorized for this resource."}

This error occurs at line:

request_body = {
        'firstName': p.first_name,
        'lastName': p.last_name,        
        'email': current_user.email,
        'ipAddress':p.ip}

customer = app_token.post('customers', request_body)

Any suggestions? In sandbox, everything works as expected. In production is when I have these issues.

Hi @Bryan_Marks, If you are primarily initiating payouts to end-users, you may be restricted to only creating the Receive-only Customer type. Assuming that is true, you’ll likely need to add "type": "receive-only" to the body of your request.

Hello Spencer,

My account has been approved for production - can you confirm I can create users who can send and receive funds?

Hi @Bryan_Marks, we just reviewed your account and updated the configuration to create users that can send and receive funds. Please let us know if you continue to experience errors/issues!

Awesome - thank you! Will update this thread if anything else pops up.

1 Like

Hello Spencer,

When creating a funding source with Plaid Dwolla, the response for reacting the funding source does not contain a funding source.

Here is the code:

  request_body = {
          'plaidToken': processor_token,
          'name': p.first_name + ' ' + p.last_name
        }


                customer = app_token.post('%s/funding-sources' % p.dwolla_customer_url, request_body)
                funding_source = customer.headers['location']

Here is the response:
{'_links': {'self': {'href': 'https://api.dwolla.com/customers/2d73c0f3-972c-403e-823f-52815678**/funding-sources', 'type': 'application/vnd.dwolla.v1.hal+json', 'resource-type': 'funding-source'}, 'customer': {'href': 'https://api.dwolla.com/customers/2d73c0f3-972c-403e-8*********', 'type': 'application/vnd.dwolla.v1.hal+json', 'resource-type': 'customer'}}, '_embedded': {'funding-sources': []}}

Notice that the funding source is nil. It does work in development mode. I am following this guide:
https://developers.dwolla.com/guides/plaid/create-funding-source#step-2---create-a-funding-source-for-a-customer-using-a-plaidtoken

Actually sorry please ignore! This code does work :slight_smile: thanks!

1 Like

Hi @spencer, we’re experiencing a similar issue. We just moved to Past as you go from the normal Scale program. I think we need to be switched back to receive and send. Can you assist ASAP? We’re live and it’s causing errors.

Hi @doreilly, can you shoot me a DM with more information on what endpoint you’re calling and information on your application? Thanks!

Hi @spencer, we have support also looking at this. Thank you for your response.

@spencer Can you help with this for our app? Getting a 403 error as well when users try to add their bank accounts, even though our app is approved.

Hello Spencer, can you assist with error we’re receiving when/during new customer creation. It worked in Sandbox, but once switched to production, we’re receiving errors. See attachment.

Hi @asvonfran

I believe @shreya has an email thread going on this issue with your dev team

Thank you, that is correct. I just saw her email.

Hello @spencer

Where do I put "type": "receive-only" while creating an account of a customer of Dwolla?

ForbiddenError: {“code”:“Forbidden”,“message”:“The supplied credentials are not authorized for this resource.”}

Please explain in detail when these types of errors come.

Hi @Megha_Kmphasis

This would be the request body for creating a Receive-only user as mentioned in our Dwolla API docs

{
  "firstName": "Jane",
  "lastName": "Merchant",
  "email": "jmerchant@nomail.net",
  "type": "receive-only",
  "businessName": "Jane Corp llc",
  "ipAddress": "99.99.99.99"
}

The above error is triggered whenever you’re attempting an action or creating a resource that you application isn’t approved for.

When i put type “receive-only” should it work for transactions?
Does it work like personal type of dwolla account?

H @Megha_Kmphasis

If you are conducting a transfer using a receive-only customer’s funding source as the destination, then this should work

Can you elaborate on this question?

Also please let me know if you had an issue creating a receive only user using the example above

Hello @kmoreira

When I create personal customer account that gives me an error like “The supplied credentials are not authorized for this resource” but I want to send money to another account so that is not possible in a “receive-only” type account.

can I create again personal accounts without using a “receive-only” type?

Is this in your sandbox or production account? It looks like you do not have permissions to create receive only accounts in production. If this is something you’d like to do please contact your account manager or sales@dwolla.com to put this in your contract.

That is correct

Yes. Here is a list of the different customer types you can create. Again if in production, please make sure you have the permissions to create desired customer type.

If you are testing in sandbox I can go ahead and enable what you’d like on request. Let me know if I can help here