redirect_uri must be shorter than or equal to 256 characters on refresh token

Bug Reporting Template
When submitting a bug report, please be sure to include the fields below. Never share any personal data or email details publicly. An admin may reach out via direct message to get more details from you regarding the issue.

  • Org name: Apideck
  • Detailed description of the issue and where it occurs:

We’re facing an issue to refresh tokens. We’re always getting this error back:

{
    "errors": [
        {
            "message": "redirect_uri must be shorter than or equal to 256 characters"
        }
    ]
}

Here’s a sample request

curl --location 'https://demo.deel.com/oauth2/tokens' \
--header 'Authorization: Basic <base64-client-id-and-secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=<the-refresh-token>' \
--data-urlencode 'client_id=<client-id> \
--data-urlencode 'client_secret=<client-secret>\'''

Our redirect URL is way smaller than 256 (about 90 chars) and the error started without any apparent change on our side.

Any ideas?

Hi @geiserapideck,

May I ask how you are calling https://demo.deel.com/oauth2/tokens?

If you can, can you try using Postman to see if it works? We have seen instances of libraries that wraps the API call and modify the value passed causing the issue.