I'm having trouble showing an ad using API

If I understood correctly, I need to use one of the four alternatives below, right?

And they all just return the token in the uri redirect_uri, is that it?

I’m doing this on the server side.