I send a request to /oauth/token but get the Invalid Grant error

I send a request to /oauth/token but get the Invalid Grant error.

$response = $client->request('POST', '/oauth/token', [
            "headers" => [
                "Authorization" => "Basic ". base64_encode('Client ID'.':'.'Client secret')
            ],
            'form_params' => [
                "grant_type" => "authorization_code",
                "code" => $request['code'],
                "redirect_uri" => 'my link'
            ],
        ]);

I used the Development credentials
Help me

Hi @pafastudio ,

Can you please confirm you’ve done all the steps outlined in the docs? Please try putting your credentials in our pre-populated Postman workspace: Postman

Make sure your redirect uri is on the App Credentials development “Allow List” as well.

The url address is in the white letter. I send the authorize request and everything is fine

Hi @pafastudio , are you saying everything is working as expected now?

Yes, everything works great.

1 Like

Amazing! Thanks for using the platform and all the best.