Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

400:The CSRF token could not be verified.

  • yuto0419
  • yuto0419's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 1 week ago - 10 months 1 week ago #243592 by yuto0419
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition  5.6.9+230306
Own server or LimeSurvey hosting:Own Server
Survey theme/template:Fruity
==================
Hi!

I would like to create a simple page like the one below and implement a function to transition to Limesurvey.
<!DOCTYPE html>
<html>
<head>
    <title>simple php page</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <form method="post" action="https::/~~~/LimeSurvey/index.php">
        <input type="submit" value="LimeSurvey">
 

But when I press the button I get "400: Could not validate CSRF token." error.
I have verified that the URL I set during operation is correct.
Please tell me how to transition to Limesurvey when I press the button.
 
Last edit: 10 months 1 week ago by yuto0419.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 1 week ago #243619 by tpartner
Replied by tpartner on topic 400:The CSRF token could not be verified.
Please use English in this section of the forum.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: yuto0419

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 1 week ago - 10 months 6 days ago #243647 by DenisChenu
Replied by DenisChenu on topic 400:The CSRF token could not be verified.
Surely an issue with your session configuration.


See @tpartner answer.
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 10 months 6 days ago by DenisChenu. Reason: See @tpartner answer.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 6 days ago #243650 by tpartner
Replied by tpartner on topic 400:The CSRF token could not be verified.
Why use a form? Why not a simple link?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • yuto0419
  • yuto0419's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 6 days ago #243665 by yuto0419
Replied by yuto0419 on topic 400:The CSRF token could not be verified.
This is because I want to prepare an input for entering the respondent's attributes and email address and then 'post' it.
I would like to issue a token by inserting the attribute and email address as a key and the respondent into the DB, set the question ID and token as the URL, and transition to the answer screen.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 6 days ago #243676 by DenisChenu
Replied by DenisChenu on topic 400:The CSRF token could not be verified.
2 solutions
1. Deactivate the CRSG protection (personnaly i don't do it, it's a really bad solution) : manual.limesurvey.org/Optional_settings#Request_settings
2. Use GET action for you form : manual.limesurvey.org/URL_fields#Prefill...using_GET_parameters

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: yuto0419

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose