API - Why does call to oauth endpoint need the redirect URI?

Why does a POST call (from my code) to the Oauth endpoint to get an access token require as a parameter the Redirect URI? Is the endpoint called all the time when the endpoint is invoked? Whenn I call the endpoint (using a valid access code), from my server-side PHP code using cURL, I get the token back as a result, but is that returned from zoom after the endpoint is called?

This is confusing to me because my endpoint, as I understand it, is called with the access code so that I can subsequently call the API and get an access token to use the API. But, the params in the callback code includes itself as a parameter, which doesn’t seem to make sense to me.

Any real explanation for what the real code flow is, from the callback function itself, would be great, I do not really know if the callback is even called or if it is just used to check for it being authorized.

Ben Cahan