Download

Download a project (With authentication)

POST https://sketchub.in/api/v2/download_project.php

This endpoint will allow users to download any public project, or their own private project.

No matter what file type is uploaded, it will download as zip.

The link generated by this endpoint is cleared every 24 hours.

Body

Name
Type
Description

uid

number

User ID

project_id

number

Project ID

email

string

RSA Encrypted Email

password

string

RSA Encrypted Password

api_key

string

Your API key

Response

{
  "status": "success",
  "message": "https://sketchub.in/storage/cache/123123123.zip",
  "status_code": "OK"
}

Download a project (Without authentication)

POST https://sketchub.in/api/v2/download_project_guest.php

This endpoint will give access to public projects only, but it requires one of the following: hcaptcha_response or access_token

  • Use provided Hcaptcha site key to generate hcaptcha_response when needed.

Body

Name
Type
Description

project_id

number

Project ID

hcaptcha_response (optional)

string

Token by hCaptcha.

access_token (optional)

string

Temporary JWT access token which is generated when you pass hcaptcha_response. Learn more.

Response

{
  "status": "success",
  "message": "https://sketchub.in/storage/cache/123123123.zip",
  "new_access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2FnZV9saW1pdCI6MSwiZXhwaXJlc19hdCI6MTcxODMzNTMyODAwMH0.yC7RdCG862PgiUOn6RvDPihT43Vk6iEu8SHMW0wJwHg"
}

How access token works in project downloading?

This endpoint exchange hcaptcha response for temporary JWT token. But the tokens can be used 10 times only within 24 hours. It works in this way:

-> You provide hcatpcha_token and project id <- Server provides you access_token (10) and project download link -> You dont need to solve hcaptcha again and again, just provide the access_token (10) and another project id <- Server provides you access_token (9) and project download link -> You provide access_token (8) and another project id <- Server provides you access_token (7) and project download link ... and so on ... <- Server provides you access_token (1) and project download link -> You provide access_token (1) and another project id <- Server provides you project download link only (in next request, provide hcaptcha_token again)

Please note that in above example, the numbers mean the number of series you can use the tokens (10 by default), once you reach the usage limit, it will not bounce back new token, and you will need to solve captcha again.

This method was founded for avoiding user to solve captcha everytime when they downloads the project. Perhaps, they only need to solve it once after 10 downloads in a day.

Last updated

Was this helpful?