# While generating token on Production getting {"error":"unauthorized\_client"}

**URL:** <https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275>\
**Category:** Authentication\
**Created:** [August 4, 2022, 5:32pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275 "2022-08-04T17:32:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ketan\_Bellaney](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/ketan_bellaney/32/3571_2.png) [@Ketan\_Bellaney](https://discuss.dwolla.com/u/Ketan_Bellaney)\
**Post date:** [August 4, 2022, 5:32pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/1 "2022-08-04T17:32:20Z")

</div>

Everything is working fine in the Sandbox account

```auto
$_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](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](http://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~

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [August 5, 2022, 2:34pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/2 "2022-08-05T14:34:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hardeep\_Kumar](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/hardeep_kumar/32/3705_2.png) [@Hardeep\_Kumar](https://discuss.dwolla.com/u/Hardeep_Kumar)\
**Post date:** [December 1, 2022, 4:57am UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/3 "2022-12-01T04:57:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [December 1, 2022, 10:37pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/4 "2022-12-01T22:37:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Hardeep\_Kumar](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/hardeep_kumar/32/3705_2.png) [@Hardeep\_Kumar](https://discuss.dwolla.com/u/Hardeep_Kumar)\
**Post date:** [December 2, 2022, 4:47am UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/5 "2022-12-02T04:47:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [December 2, 2022, 4:01pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/6 "2022-12-02T16:01:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mahip\_Kaushal](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mahip_kaushal/32/3717_2.png) [@Mahip\_Kaushal](https://discuss.dwolla.com/u/Mahip_Kaushal)\
**Post date:** [December 16, 2022, 11:22am UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/7 "2022-12-16T11:22:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [December 16, 2022, 3:41pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/8 "2022-12-16T15:41:04Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Mahip\_Kaushal](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mahip_kaushal/32/3717_2.png) [@Mahip\_Kaushal](https://discuss.dwolla.com/u/Mahip_Kaushal)\
**Post date:** [December 16, 2022, 4:48pm UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/9 "2022-12-16T16:48:42Z")

</div>

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](mailto: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!

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [December 20, 2022, 2:56am UTC](https://discuss.dwolla.com/t/while-generating-token-on-production-getting-error-unauthorized-client/8275/10 "2022-12-20T02:56:33Z")

</div>

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!
