API Reference
OAuth: consent

Consent screen

GET/o/oauth2/v2/auth
Base URL: https://google-ads.mimicr.dev · provider: https://accounts.google.com

Google's OAuth 2.0 authorization endpoint. Redirect the user's browser here: the user signs in, chooses an account and grants the requested scopes. Google then redirects to redirect_uri with code (and state, scope), or with error=access_denied when the user declines. Errors in the request itself (unknown client, unauthorized redirect URI, invalid parameters) are shown on the page and never redirected.

In Mimicr, this is a hosted page that lists the sandbox's Google users and the requested scopes as checkboxes. Unchecking a scope simulates granular consent. The code is valid for 10 minutes and can be used once. Any redirect URI is accepted while the homologation toggle anyRedirectUri is on (the default).

Authorization

Public route, no token.

Query parameters

client_idstringrequired

The client ID for your application, from the Mimicr console (<12 digits>-<32 chars>.apps.googleusercontent.com).

redirect_uristring<uri>required

Determines where the API server redirects the user after the user completes the authorization flow. The value must exactly match one of the authorized redirect URIs for the OAuth 2.0 client.

Example: "https://app.example.com/oauth/google/callback"
response_typestringrequired

Determines whether the Google OAuth 2.0 endpoint returns an authorization code. Set the parameter value to code for web server applications.

code
scopestringrequired

A space-delimited list of scopes that identify the resources that your application could access on the user's behalf.

Example: "openid email https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/datamanager"
access_typestring

Indicates whether your application can refresh access tokens when the user is not present at the browser. Set the value to offline to receive a refresh token the first time your application exchanges an authorization code for tokens.

onlineoffline
statestring

Specifies any string value that your application uses to maintain state between your authorization request and the authorization server's response. The server returns the exact value in the redirect.

include_granted_scopesstring

Enables applications to use incremental authorization to request access to additional scopes in context.

truefalse
login_hintstring

If your application knows which user is trying to authenticate, it can use this parameter to provide a hint to the Google Authentication Server. In Mimicr, it preselects that sandbox user.

promptstring

A space-delimited, case-sensitive list of prompts to present the user. none redirects at once when an earlier grant exists, else with error=interaction_required.

noneconsentselect_account

Responses

200The consent screen (HTML).
string
302Redirect to redirect_uri with code, state, scope, authuser and prompt when the user allows, or with error=access_denied (or interaction_required) and state.
400Error page: redirect_uri_mismatch or invalid_request.
string
401Error page: invalid_client ("The OAuth client was not found.").
string