While generating token on Production getting {"error":"unauthorized_client"}

Everything is working fine in the Sandbox account

$_account_link = 'https://api.dwolla.com/';
        $this->_account_link = $_account_link;
        DwollaSwagger\Configuration::$debug = DWOLLA_DEBUG;

        DwollaSwagger\Configuration::$username = $_client_id;
        DwollaSwagger\Configuration::$password = $_client_secret;
        $apiClient = new DwollaSwagger\ApiClient($this->_account_link);

        $tokensApi = new DwollaSwagger\TokensApi($apiClient);

        $appToken = $tokensApi->token();
        $this->_token =  $appToken->access_token;

[DEBUG] HTTP Request body ~BEGIN~
grant_type=client_credentials
~END~
HTTP/1.1 400 Bad Request
Date: Thu, 04 Aug 2022 17:29:22 GMT
Content-Type: application/json
Content-Length: 31
Connection: keep-alive
Cache-Control: no-store
X-Request-Id: 08bf956b-8213-4d91-9636-15c074edbbb4
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
Set-Cookie: __cf_bm=otSVZY_sIT6MdF3VGI/EhoQEgJ8dhgVUccUCmKHuI/fA+tOAApF/xv3fkOinKXbU=; path=/; expires=Thu, 04-Aug-22 17:59:22 GMT; domain=.dwolla.com; HttpOnly; Secure; SameSite=None
Server: cloudflare
CF-RAY: 735903c2d9a73206-BOM

{“error”:“unauthorized_client”}[DEBUG] HTTP Response body ~BEGIN~
{“error”:“unauthorized_client”}
~END~

Hi @Ketan_Bellaney – would you be able to give it a try again? Is it still returning that error?

1 Like

Hey, @shreya
Yes, I’m also getting the same error with my client’s production account.

Hi @Hardeep_Kumar – are you able to share the Account ID of the Production account? I can look it up on our end to see the application’s status which might be preventing it from making calls to the API.

1 Like

Thanks @shreya
It’s working now.
The production account was suspended and when support unsuspend production account they said that they forgot to the unsuspend application along with the main account.
My client connect support via e-mail and it’s fixed now.

1 Like

Hi @Hardeep_Kumar – thank you posting the update! Apologies again on behalf of our team for the inconvenience there with the suspended application! :pray:

1 Like

Hi Shreya,
I am also expirencing the same “unauthorized_client” issue.
I have checked API Key and API Secret multiple time and it’s correct and copied directly from Dwolla account.
Can you please help me, my client is losing pataince.

Hi @Mahip_Kaushal – I can take a look! Could you please share the Account ID or any Dwolla GUID from your account (except for the client key and secret)?

Hi Shreya,
Thank you for your reply.
I couldn’t find the Account ID or GUID in my Dwolla’s Dashboard.
The account is associated with it@nevly.com email id. This might help you to find the account at your end.
Please let me know if any other details you might need.
Thank you!

Hi @Mahip_Kaushal , It appears that your account wasn’t active when you encountered this error in the API. After reviewing your account, your application and account look to be in an active state now. Please let us know if there’s anything else we can do to assist!