# unsupported_grant_type

> The wrong grant_type

- Status: 400 Bad Request
- Returned by: The account connection (/oauth)
- Retry (`retryWhen`): `after_fix`
- Did anything happen? (`outcome`): `none` (It did not happen)
- The account connection
- Page in the portal: https://developers.rivr.io/errors/unsupported_grant_type
- Try it: `GET https://developers.rivr.io/errors/simulate/unsupported_grant_type` answers with the code's exact wire form; `?succeedAfter=N&attempt=K` gives a 200 once `attempt` passes `N`

## What it means

`grant_type` is something other than `authorization_code`. `POST /oauth/token` takes the code exchange only. `/connect/token` answers the same code for a `grant_type` it doesn't have.

## What your system does

Send `grant_type=authorization_code`. Platform tokens and merchant tokens are fetched on `/connect/token`, with a JSON body.

## Is it worth retrying?

No, not without changing the call.

`retryWhen`: `after_fix`. Change the request first, as the code's page says: a value, the token, a header or a new key. Then send it.

## Did anything happen?

`outcome`: `none`. **It did not happen.** This call did not do what you asked for and changed nothing else that you can see or that concerns money. Where the code has an `outcomeNote`, it takes precedence.

## Example: The account connection (/oauth)

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store

{
  "error": "unsupported_grant_type",
  "error_description": "Only authorization_code is supported."
}
```

The `title`, `detail`, `message` and `error_description` texts are exactly as the API writes them today.
