What is the purpose of `cdata`?

What is the name of the domain?

localhost

What is the error number?

n/a

What is the issue you’re encountering

Explanation for cdata

What steps have you taken to resolve the issue?

The docs for cdata state:

A customer payload that can be used to attach customer data to the challenge throughout its issuance and which is returned upon validation. This can only contain up to 255 alphanumeric characters including _ and -.

What is the use case for this feature? I don’t understand when it should be used.

Hey @newby, cdata is a Cloudflare Turnstile parameter that allows you to attach additional data to a validation challenge and have it returned to you after the challenge is completed. It’s optional but useful for specific configurations, such as user identification or debugging. For example, you could include "cdata": "user01" with the challenge, and after validation, the same value will be returned along with the challenge response, helping you match the challenge to the correct user in this case. Also, important to note that the documentation for cdata says it’s limited to 255 characters only.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.