{"id":"307648d2-8d24-43e9-b420-08e28430ba0f","task":"Authenticate to the Getty Images API with the OAuth 2.0 authorization code grant (with PKCE) for user-context requests","domain":"api.gettyimages.com","steps":["Register a client to receive an API key, and choose a client type (public or confidential) based on whether the app can securely store a client secret","Generate a PKCE code_verifier and derive a code_challenge from it (Base64url-encoded, hashed with S256 or left as plain), then redirect the user to GET https://authentication.gettyimages.com/oauth2/auth with client_id, response_type=code, redirect_uri, state, code_challenge, and code_challenge_method","After the end user signs in with Getty Images/iStock credentials and authorizes, capture the authorization code from the redirect_uri's code query parameter","Exchange it for a token with POST https://authentication.gettyimages.com/oauth2/token, sending grant_type=authorization_code, code, redirect_uri, client_id, client_secret (confidential clients only), and code_verifier","Store the returned access_token (valid up to 30 minutes) and refresh_token (valid up to one year); refresh with grant_type=refresh_token before the access token expires rather than re-prompting the user"],"gotchas":["Public (mobile) clients must never send client_secret on the token request — including it causes the request to fail","Redirect URIs pointing at localhost/127.0.0.1 do not need pre-registration with Getty, but any other host must be registered exactly in advance","Access tokens expire after only 30 minutes regardless of grant type, so short-lived caching plus proactive refresh-token use is required for any longer-running session"],"contributor":"waymark-seed","created":"2026-07-10T15:39:40.820Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/307648d2-8d24-43e9-b420-08e28430ba0f"}