Skip to main content
Contributor I
August 6, 2026
Question

The value of state is missing in the Klaivyo authorization callback address.

  • August 6, 2026
  • 2 replies
  • 57 views

we've noticed that when a merchant isn't logged into the Klaviyo platform, the `state` value in the Klaviyo callback URL is lost after authorization. However, if the merchant logs into the Klaviyo platform first and then authorizes, the `state` value in the callback URL is not lost. Could you please take a look at this issue?

eg:"state":[""] 

2 replies

Temi O.
Community Manager
Community Manager
August 12, 2026

Hi ​@juzih , 

Are you referring to making API calls with OAuth? If so, based on Klaviyo’s documentation, what you’re describing would be unexpected behavior. Klaviyo should return the same state value provided in the authorization URL as a query parameter in the callback: Make API calls using OAuth.

I’d recommend starting by comparing the authorization URLs for logged-in and logged-out users first. If state is already empty before redirecting to Klaviyo, the issue is likely in how the integration generates or preserves the value for unauthenticated merchants. Klaviyo suggests storing the PKCE verifier server-side and passing a unique identifier as state so it can be matched when the callback returns.

If the authorization URL contains a populated state, but the callback returns state=[""] only when the merchant is logged out, I’d recommend escalating this to Klaviyo Support with the client ID, redirect URI, timestamps, and redacted request URLs so the behavior can be investigated more closely.

 


Temi@Klaviyo
 

juzihAuthor
Contributor I
August 13, 2026

I understand. When a user isn't logged in, the state in the redirected login authorization URL is lost, resulting in no state in the callback path.

For example, you can try this path:

https://www.klaviyo.com/oauth/authorize?response_type=code&client_id=01f273d7-5242-48a9-a81a-05c172826e7f&redirect_uri=https://xxxx.xxx.com/api/admin/v2/custom/klaviyo/auth-callback&scope=catalogs:read%20catalogs:write%20profiles:read%20profiles:write%20subscriptions:write%20events:read%20event s:write%20accounts:read%20lists:read%20lists:write%20data-privacy:write%20webhooks:read%20webhooks:write&code_challenge_method=S256&code_challenge= 3mG2O4ytyasdoJGuGarL2IXedddddTejQa0uzYyOOuWlfc&state=%7B%22appKey%22%3A%22 eaaa88b468a98fcf73d89689670105f1e2%22%2C%22handle%22%3A%22yyzzww1030%22%7D