Discuss Scratch

MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

Title says it all. The sb3 download doesn't work on scratchattach nor directly through web requests (maybe for requests i'm doing it wrong but idk). Any ideas?
redspacecat
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

If you're trying to download a project with the API, the procedure hasn't changed recently as far as I know.
1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
2. You fetch the project contents, using the project token: e.g. https://projects.scratch.mit.edu/123456?token=project_token_here
MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

redspacecat wrote:

If you're trying to download a project with the API, the procedure hasn't changed recently as far as I know.
1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
2. You fetch the project contents, using the project token: e.g. https://projects.scratch.mit.edu/123456?token=project_token_here
How do you get the project token?
redspacecat
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

MineTurte wrote:

redspacecat wrote:

If you're trying to download a project with the API, the procedure hasn't changed recently as far as I know.
1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
2. You fetch the project contents, using the project token: e.g. https://projects.scratch.mit.edu/123456?token=project_token_here
How do you get the project token?

redspacecat wrote:

1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
The project token is the parameter called “project_token” in that API response.
MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

redspacecat wrote:

MineTurte wrote:

redspacecat wrote:

If you're trying to download a project with the API, the procedure hasn't changed recently as far as I know.
1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
2. You fetch the project contents, using the project token: e.g. https://projects.scratch.mit.edu/123456?token=project_token_here
How do you get the project token?

redspacecat wrote:

1. You fetch the API page for the project to get the project_token: e.g. https://api.scratch.mit.edu/projects/123456/
The project token is the parameter called “project_token” in that API response.
Ah alright, thanks
MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work


Got this…
MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

bump?
gem1001
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

What project are you trying to download? Redspacecat's directions work for me

MineTurte wrote:

(snip of big screenshot)
Got this…
Linux user

Last edited by gem1001 (May 7, 2026 14:58:54)

MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

gem1001 wrote:

What project are you trying to download? Redspacecat's directions work for me

MineTurte wrote:

(snip of big screenshot)
Got this…
Linux user
Okay trying again it actually does seem to work, however it just downloads a text file of what seems to be the contents of the project but it's not a sb3 file nor zip
gem1001
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

MineTurte wrote:

gem1001 wrote:

What project are you trying to download? Redspacecat's directions work for me

MineTurte wrote:

(snip of big screenshot)
Got this…
Linux user
Okay trying again it actually does seem to work, however it just downloads a text file of what seems to be the contents of the project but it's not a sb3 file nor zip
That's because projects.scratch.mit.edu only downloads the project.json unless it is a 1.x project
The filenames of the assets to be downloaded from assets.scratch.mit.edu are in every [stage/sprite][n][costumes/sounds][n]['md5ext']

Last edited by gem1001 (May 7, 2026 16:48:14)

MineTurte
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

gem1001 wrote:

MineTurte wrote:

gem1001 wrote:

What project are you trying to download? Redspacecat's directions work for me

MineTurte wrote:

(snip of big screenshot)
Got this…
Linux user
Okay trying again it actually does seem to work, however it just downloads a text file of what seems to be the contents of the project but it's not a sb3 file nor zip
That's because projects.scratch.mit.edu only downloads the project.json unless it is a 1.x project
Ah alright. Guess I gotta completely rebuild it lol. Ok
redspacecat
Scratcher
1000+ posts

Downloading sb3 through Scratch API / scratchattach doesn't work

MineTurte wrote:


Got this…
That's because the token expires after a few minutes, you have to be quick

MineTurte wrote:

Okay trying again it actually does seem to work, however it just downloads a text file of what seems to be the contents of the project but it's not a sb3 file nor zip
As mentioned above, only the project.json file is actually stored on the server. The sb3/zip file format is only for downloading projects to make sure all assets are included for offline support.

Powered by DjangoBB