uphold / docs

Uphold API Reference
https://uphold.com/en/developer/api/documentation/
48 stars 39 forks source link

How can I athenticate by client credentials flow in Sandbox env? #171

Open jossperdomo opened 5 years ago

jossperdomo commented 5 years ago

Recently I tried to authenticate using my sandbox business user by client credentials flow. I did the following request

curl -X POST https://api-sandbox.uphold.com/oauth2/token \
>   -H "Content-Type: application/x-www-form-urlencoded" \
>   -u <client-id>:<client-secret> \
>   -d 'grant_type=client_credentials'

But I receive as response

{"error":"unauthorized_client"}

Could anyone please help me with this? Thanks!

tycooperaow commented 4 years ago

Yeah, I'm receiving the same error,

eiromz commented 4 years ago

did anyone resolve this

osmtechnologies commented 4 years ago

yeah, I'm facing the same error,

I think its come when account not verified

waldyrious commented 3 years ago

Apologies for the late response, folks. It's likely that the issue you were facing was due to the requirement that only manually approved accounts can request an access token using the client credentials flow. This is indicated in the documentation as such:

For business usage only you may choose to use client credentials authentication. This requires manual approval from Uphold.

...but it wasn't made explicit that this also applied to the Sandbox environment.

The good news is that we recently removed that requirement for the Sandbox environment (it's still in place for the production environment), so you should now be able to use the client credentials flow to obtain an access token. We'd appreciate if you could confirm that the issue is solved, so that we can close it.