Invalid Redirect(4700) Error when oAuth flow

Hi tommy,

I encoded the url but still received error

This one is not working: https://zoom.us/oauth/authorize?response_type=code&client_id=C3ECOv6UQXysVDwKV0jN7Q&redirect_uri=https%3A%2F%2F3cx-msteams-api.infisys.io%2FZoom%2FAuth?state=h682%7CM%7D%5D%5BM

But this one works fine: https://zoom.us/oauth/authorize?response_type=code&client_id=C3ECOv6UQXysVDwKV0jN7Q&redirect_uri=https%3A%2F%2F3cx-msteams-api.infisys.io%2FZoom%2FAuth?state=h682abc

Hey @thanh.huynh,

For the one that works, did you base64 encode it?

Thanks,
Tommy

Hi,

After I base64 encoded the state value, its value became too long
And the site threw 500 error code
Maybe I will try cut some content

Thanks for the update @thanh.huynh

Let me know if you find a good middle ground. :slight_smile:

-Tommy

Hi tommy,

I still receive Invalid redirect url (4,700) error sometimes
Because you know. Base64 can contain + character
You can read the definition here: https://en.wikipedia.org/wiki/Base64
For example, the following state value will cause error:
TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg
dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu
dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo
ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4+=

It work fine if redirect url doesn’t contain any + characters

Hey @thanh.huynh,

You can also try url encoding your state param: https://www.urlencoder.org/

My suggestion for you is to only have url safe characters in your state param.

Thanks,
Tommy