Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Captcha Token While Creating account from admin #96

Open
surajTupeBorn opened this issue Nov 24, 2020 · 6 comments
Open

Invalid Captcha Token While Creating account from admin #96

surajTupeBorn opened this issue Nov 24, 2020 · 6 comments
Assignees

Comments

@surajTupeBorn
Copy link

surajTupeBorn commented Nov 24, 2020

Hello there,

I'm trying to create an account from backed, but getting the below error while submitting the details.

API Method : apiMethod=accounts.register
URL: https://accounts.us1.gigya.com/accounts.register

Gigya\PHP\GSResponse Object
(
[errorCode:Gigya\PHP\GSResponse:private] => 400009
[errorMessage:Gigya\PHP\GSResponse:private] => Validation error
[rawData:Gigya\PHP\GSResponse:private] => {
"callId": "2dae999a964e463abd8d939ad4bd835a",
"errorCode": 400009,
"errorDetails": "Validation failed",
"errorMessage": "Validation error",
"apiVersion": 2,
"statusCode": 400,
"statusReason": "Bad Request",
"time": "2020-11-24T08:21:07.772Z",
"validationErrors": [
{
"errorCode": 400021,
"message": "",
"fieldName": "captchaToken"
}
]
}
[data:Gigya\PHP\GSResponse:private] => Gigya\PHP\GSObject Object
(
[map:Gigya\PHP\GSObject:private] => Array
(
[callId] => 2dae999a964e463abd8d939ad4bd835a
[errorCode] => 400009
[errorDetails] => Validation failed
[errorMessage] => Validation error
[apiVersion] => 2
[statusCode] => 400
[statusReason] => Bad Request
[time] => 2020-11-24T08:21:07.772Z
[validationErrors] => Gigya\PHP\GSArray Object
(
[map:Gigya\PHP\GSArray:private] => Array
(
[0] => Gigya\PHP\GSObject Object
(
[map:Gigya\PHP\GSObject:private] => Array
(
[errorCode] => 400021
[message] =>
[fieldName] => captchaToken
)

                                    )

                            )

                    )

            )

    )

NOTE: Invisible Captcha is enabled at the GIGYA console.

Thanks in advance!!

@levistepanov
Copy link

I might be wrong, but i think captcha is only supported from client-side. why are you trying to use it server side... you should trust your server is who it says it is.

@surajTupeBorn
Copy link
Author

@levistepanov Correct, I'm not sure but the Invisible Captcha is managed on Global Level, that is why it is giving "Validation error" on "fieldName": "captchaToken".
After disabled Captch, It is working fine.

Screenshot - 2020-11-24T160212 208
Screenshot - 2020-11-24T160127 398

Is there any parameter to disable captcha while submitting a request to the server throgh API?

@levistepanov
Copy link

Only thing i can think of is, maybe you are not passing credentials in the server request? if you do not pass key/secret, it will consider it a client-side call and require captcha. try adding your appkey and secret to the request (if not already doing so) and see if it helps. If that isn't it, will have to wait for ynhockey to reply.

$request = new GSRequest($apiKey,$secretKey,$method, null, true, $userKey);

@surajTupeBorn
Copy link
Author

@levistepanov, I'm using a default API call, it includes everything $apiKey,$secretKey,$method, null, true, and $userKey.

@surajTupeBorn
Copy link
Author

Just follow up: @Ynhockey @levistepanov any resolution or guidance?

@Ynhockey
Copy link
Collaborator

Hi Suraj,

Sorry for the late reply. I will look to see if there is a solution for you, generally you need to send a CAPTCHA token with accounts.register when the policy is on, which the Magento module isn't built for.

However, please open a ticket with support so that we can track the issue internally and respond accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants