Shopee Captcha Image Solving
Solve Shopee e-commerce platform captcha challenges including slide puzzles and rotation challenges. Shopee uses custom verification for account security and transaction protection with 99.1% accuracy.
Shopee is Southeast Asia's largest e-commerce platform that uses custom captcha systems for bot detection and account security. Their captchas typically involve either sliding a puzzle piece horizontally or clicking on a rotated image to match a reference. Our API handles both challenge types automatically.
Captcha Type
Use the following captcha type identifier in your API requests:
"type": "SHOPEE_IMAGE"
Challenge Types
| Type | Description | Images Required |
|---|---|---|
| slide | Horizontal slide puzzle (old type) | 2 images (piece + background) |
| rotate | Click on rotated image (new type) | 2 images (rotated + reference) |
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
captcha.type |
string | required | Must be "SHOPEE_IMAGE" |
captcha.metadata.siteUrl |
string | required | Shopee page URL |
captcha.payload.images |
array | required | Array with 2 base64-encoded images |
captcha.payload.questionType |
string | required | "slide" or "rotate" |
Slide Example
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'SHOPEE_IMAGE',
metadata: {
siteUrl: 'https://shopee.com'
},
payload: {
images: [
'puzzle_piece_base64',
'background_image_base64'
],
questionType: 'slide'
}
}
})
});
Rotate Example
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'SHOPEE_IMAGE',
metadata: {
siteUrl: 'https://shopee.com'
},
payload: {
images: [
'rotated_image_base64',
'reference_image_base64'
],
questionType: 'rotate'
}
}
})
});
Response Format
Create Task Response
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Completed - Slide)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"answers": [156],
"timestamp": "2025-11-05T12:34:56.789Z"
}
}
}
For slide: X coordinate to slide puzzle piece.
Fetch Result Response (Completed - Rotate)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"answers": [120, 85],
"timestamp": "2025-11-05T12:34:56.789Z"
}
}
}
For rotate: [x, y] coordinates to click on rotated image.
Python Example
import requests
import time
def solve_shopee(images, question_type, site_url, api_key):
if len(images) != 2:
raise ValueError('Shopee requires exactly 2 images')
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'SHOPEE_IMAGE',
'metadata': {'siteUrl': site_url},
'payload': {
'images': images,
'questionType': question_type
}
}
}
)
create_data = create_response.json()
if not create_data['success']:
raise Exception(create_data['error']['message'])
task_id = create_data['task']['id']
while True:
time.sleep(3)
result_response = requests.post(
'https://solver-api.mydisct.com/fetchResult',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={'taskId': task_id}
)
result_data = result_response.json()
if result_data['task']['status'] == 'completed':
return result_data['task']['result']['answers']
elif result_data['task']['status'] == 'failed':
raise Exception('Captcha solving failed')
# Slide example
solution = solve_shopee(
images=['piece_base64', 'background_base64'],
question_type='slide',
site_url='https://shopee.com',
api_key='YOUR_API_KEY'
)
print(f'Slide to X: {solution[0]}')
Implementation Guide
Step 1: Extract Images from Shopee
Shopee captchas require extracting 2 specific images. Here's how to identify and extract them:
// Extract Shopee captcha images
function extractShopeeImages() {
const slideContainer = document.querySelector('.shopee-captcha__slide-container');
if (slideContainer) {
const piece = slideContainer.querySelector('.puzzle-piece img') ||
slideContainer.querySelector('img[alt*="piece"]');
const background = slideContainer.querySelector('.background img') ||
slideContainer.querySelector('img[alt*="background"]');
if (piece && background) {
const pieceBase64 = getImageAsBase64(piece);
const backgroundBase64 = getImageAsBase64(background);
return { images: [pieceBase64, backgroundBase64], type: 'slide' };
}
}
const rotateContainer = document.querySelector('.shopee-captcha__rotate-container');
if (rotateContainer) {
const rotated = rotateContainer.querySelector('.rotated-image img');
const reference = rotateContainer.querySelector('.reference-image img');
if (rotated && reference) {
const rotatedBase64 = getImageAsBase64(rotated);
const referenceBase64 = getImageAsBase64(reference);
return { images: [rotatedBase64, referenceBase64], type: 'rotate' };
}
}
return null;
}
function getImageAsBase64(imgElement) {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = imgElement.naturalWidth;
canvas.height = imgElement.naturalHeight;
ctx.drawImage(imgElement, 0, 0);
return canvas.toDataURL('image/png').split(',')[1];
}
Step 2: Send to API and Apply Solution
async function solveShopeeCaptcha(siteUrl) {
const captchaData = extractShopeeImages();
if (!captchaData) {
throw new Error('Could not extract Shopee captcha data');
}
const createResponse = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'SHOPEE_IMAGE',
metadata: { siteUrl },
payload: {
images: captchaData.images,
questionType: captchaData.type
}
}
})
});
const createData = await createResponse.json();
if (!createData.success) {
throw new Error(createData.error.message);
}
const taskId = createData.task.id;
while (true) {
await new Promise(resolve => setTimeout(resolve, 3000));
const resultResponse = await fetch('https://solver-api.mydisct.com/fetchResult', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({ taskId })
});
const resultData = await resultResponse.json();
if (resultData.task.status === 'completed') {
const solution = resultData.task.result.answers;
applyShopeeSolution(solution, captchaData.type);
break;
} else if (resultData.task.status === 'failed') {
throw new Error('Captcha solving failed');
}
}
}
function applyShopeeSolution(solution, type) {
if (type === 'slide') {
const slider = document.querySelector('.shopee-captcha__slider');
const sliderHandle = slider.querySelector('.slider-handle');
const slideDistance = solution[0]; // X coordinate
sliderHandle.style.transform = `translateX(${slideDistance}px)`;
const event = new MouseEvent('mouseup', { bubbles: true });
sliderHandle.dispatchEvent(event);
} else if (type === 'rotate') {
const [x, y] = solution;
const captchaArea = document.querySelector('.shopee-captcha__rotate-container');
const clickEvent = new MouseEvent('click', {
clientX: captchaArea.offsetLeft + x,
clientY: captchaArea.offsetTop + y,
bubbles: true
});
captchaArea.dispatchEvent(clickEvent);
}
}
await solveShopeeCaptcha('https://shopee.com');
Best Practices
- Always provide exactly 2 images
- First image is puzzle piece/rotated image
- Second image is background/reference
- Slide returns single X coordinate
- Rotate returns [x, y] click coordinates
Common Issues
Solution: Shopee requires exactly 2 images - puzzle piece and background. Ensure you're sending both images in the correct order.
Solution: Slide challenges return a single X coordinate. Make sure you're applying the solution to the horizontal slider element.
Solution: Rotate challenges return [x, y] coordinates relative to the image container. Adjust for any offset if the container has padding or margins.