How to use protection settings on CapMonster Pro?

statusCode

Новичок
Регистрация
11.01.2022
Сообщения
5
Благодарностей
0
Баллы
1
Hello,

I'm having troubles figuring out how to use protection settings in Capmonster Pro. I enabled protection settings and I set a random key in the text box.
Now, I couldnt find much information on how to use the key I set. I tried setting the key in the payload to send to Capmonster's API:

JSON:
data = {
    "clienktKey":"myProtectionKey",
    "task":{
        "type":"ImageToTextTask",
        "body":encoded_image
    }
}
But I would get:
JSON:
{"errorId":1,"errorCode":"ERROR_KEY_DOES_NOT_EXIST","errorDescription":"","taskId":0}
I also tried to set a login:password in the protection settings textbox and then try to query my Capmonster Pro with HTTP authentication by requesting:

http://login:password@myServer:8080/createTask (along with the payload data)

but still, same results.

Any help?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113
Protection key should be used as API-key for captcha service which API you emulate in CapMonster
 

statusCode

Новичок
Регистрация
11.01.2022
Сообщения
5
Благодарностей
0
Баллы
1
So what am I doing wrong? This is how my protection settings look and I posted my payload data already. Regardless of the API key matching both server and client side, I still get that error.
87651
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113

statusCode

Новичок
Регистрация
11.01.2022
Сообщения
5
Благодарностей
0
Баллы
1
I'm not using login:password, it was just an attempt because I was out of clues.

I build this script months ago so I dont remember what API this is, I think it's the same as Capmonster Cloud where you can use the createTask module and getTaskResult module. Here's my python snippet for reference.


Python:
data = {
    "clienktKey":"myProtectionKey",
    "task":{
        "type":"ImageToTextTask",
        "body":encoded_image
    }
}

r = requests.post("http://myServer:8080/createTask",json = data)

taskId = r.json()["taskId"]
data = {
    "clienktKey":"myProtectionKey",
    "taskId":taskId
}

# Loop until this request has status == ready
r = requests.post("http://myServer:8080/getTaskResult",json = data)
Maybe this API doesnt support protection? Just to be clear, this API works absolutely fine without protection.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113
I'm not using login:password, it was just an attempt because I was out of clues.

I build this script months ago so I dont remember what API this is, I think it's the same as Capmonster Cloud where you can use the createTask module and getTaskResult module. Here's my python snippet for reference.


Python:
data = {
    "clienktKey":"myProtectionKey",
    "task":{
        "type":"ImageToTextTask",
        "body":encoded_image
    }
}

r = requests.post("http://myServer:8080/createTask",json = data)

taskId = r.json()["taskId"]
data = {
    "clienktKey":"myProtectionKey",
    "taskId":taskId
}

# Loop until this request has status == ready
r = requests.post("http://myServer:8080/getTaskResult",json = data)
Maybe this API doesnt support protection? Just to be clear, this API works absolutely fine without protection.
It seems you are sending request to Cloud, not capmonster program....
I'm still asking you to check ip settings in CapMonster and make sure they are correct
CM_IP_Port.png
 

statusCode

Новичок
Регистрация
11.01.2022
Сообщения
5
Благодарностей
0
Баллы
1
They are correct, as I said, the API works fine without protection. My Capmonster receives the captchas and solves them. The issue comes when I enable protection...
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 246
Благодарностей
1 820
Баллы
113
You have a mistake in "clienktKey" word.
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)