In Mindstudio integrations I’ve added the Client ID and Secret Key from Canva and I’m getting a connected to Canva successfully message.
When I try to run my agent it’s not connecting to Canva to run the OAuth flow test.
When I visit this URL it’s giving error tokens not valid https://app.mindstudio.ai/integrations/oauth/redeem/canva
Connection to Canva failed. Missing required tokens.
URL of my agent: https://app.mindstudio.ai/agents/512a0e49-5593-4f28-8b36-a133b749c35d/edit
This is a follow-up to my original ticket regarding the Canva integration failure. I have performed extensive troubleshooting and believe the issue is internal to the platform’s handling of the PKCE flow.
The problem is isolated to the final Token Exchange step.
Troubleshooting Summary
-
Credentials Check: Client ID and Client Secret have been triple-checked and verified. Upon configuration save, the status briefly shows “Connected to Canva successfully”.
-
Redirect URI Check: The Redirect URI is correctly registered in the Canva Developer Portal. The authorization step completes, and I am successfully redirected back to Mindstudio.
-
Persistent Error: Despite the correct setup, the integration status remains “Connection to Canva failed. Missing required tokens.”
-
Test Flow Result: After authorizing on Canva, I am redirected to the Mindstudio redeem URL with the error message: “tokens not valid”.
Technical Diagnosis
This pattern of failure indicates that the flow works up to the point of redirection, but fails during the secure, server-to-server exchange of the authorization code for the final access token.
Given that this flow requires PKCE (Proof Key for Code Exchange):
-
Hypothesis: The platform is failing to correctly utilize the temporary secret (code_verifier) that corresponds to the initial code_challenge sent to Canva.
-
Likely Cause: The code_verifier is either not being generated, stored, or correctly included in the final API call to Canva’s token endpoint (POST /api/oauth/token).
Hi @ramelton,
Thanks for the post!
Please make sure the read and write scopes are enabled in Canva so your MindStudio Agent can use the connector:
Hi Alex, I was able now to submit my App to Canva for review that was the problem. Canva scopes were not configured correctly, thank you.