API Reference
Exchange a code or refresh a token
/oauth/v2/accessTokenhttps://linkedin-ads.mimicr.dev · provider: https://www.linkedin.comExchanges the authorization code for an access token (60 days) and a refresh token (365 days), or refreshes the access token. Form-encoded.
grant_type=authorization_code:code,client_id,client_secret,redirect_uri(the same as on the authorization URL).grant_type=refresh_token:refresh_token,client_id,client_secret. Returns a new access token and the same refresh token with its remaining lifetime.
Requesting a different set of scopes than an earlier grant revokes the member's earlier tokens for this app.
Authorization
Public route, no token.
Body
application/x-www-form-urlencodedGrant type.
authorization_coderefresh_tokenThe authorization code (authorization_code).
The redirect_uri of the authorization (authorization_code).
The refresh token (refresh_token).
Client id of the app.
Client secret of the app.
Responses
200Tokens.
Opaque access token, about 500 characters (plan for 1,000).
Seconds until the access token expires: 5184000 (60 days).
Programmatic refresh token. In Mimicr it comes while the homologation toggle programmaticRefresh is on (default).
Seconds until the refresh token expires: 31536000 (365 days) on the first exchange, then the remaining time; a refresh never extends it.
Granted scopes, space-separated.
400invalid_request (missing parameter, or a bad, expired or revoked refresh token) or invalid_redirect_uri (code expired or used, or another app or redirect_uri).
Error code (invalid_request, invalid_redirect_uri, invalid_client, server_error).
Error message.
401invalid_request "authorization code not found" or invalid_client (wrong secret).
Error code (invalid_request, invalid_redirect_uri, invalid_client, server_error).
Error message.
500server_error, from the sandbox chaos.
Error code (invalid_request, invalid_redirect_uri, invalid_client, server_error).
Error message.