How to use protection settings on CapMonster Pro?

statusCode

Новичок
Joined
Jan 11, 2022
Messages
5
Reaction score
0
Points
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
Staff member
Joined
Nov 5, 2014
Messages
22,269
Reaction score
5,853
Points
113
Protection key should be used as API-key for captcha service which API you emulate in CapMonster
 

statusCode

Новичок
Joined
Jan 11, 2022
Messages
5
Reaction score
0
Points
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
Staff member
Joined
Nov 5, 2014
Messages
22,269
Reaction score
5,853
Points
113

statusCode

Новичок
Joined
Jan 11, 2022
Messages
5
Reaction score
0
Points
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
Staff member
Joined
Nov 5, 2014
Messages
22,269
Reaction score
5,853
Points
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

Новичок
Joined
Jan 11, 2022
Messages
5
Reaction score
0
Points
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
Staff member
Joined
Nov 5, 2014
Messages
22,269
Reaction score
5,853
Points
113
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...
Please repeat the problem and make diagnostic report (see details here).
 

nicanil

Client
Joined
Mar 6, 2016
Messages
2,242
Reaction score
1,807
Points
113
You have a mistake in "clienktKey" word.
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)