Both Generic OAuth2.0 and Callout Authenticator API policies contain a Response Handler field in which you can configure an expression to determine how the response is being interpreted. You can use anything in the response received from the callout to your URL.
Inside of this Response Handler field, you have two expression objects available:
The "response" object which contains the response from the callout to your URL.
The "Result" object, which contains functions to control how you want the response to be handled.
You can modify the Response Handler expression according to your own response handling logic, using the functions inside the Result object defined in the following table: