scratch-api
scratch-api copied to clipboard
Problem when trying to get a project
I have been able to use the scratch-api successfully a few months ago. I have downloaded 500+ projects, what was great. Otherwise it would be a tedious task for our team. Today I tried to do it again, and couldn't downloaded a single one. Below is the error message I get when printing the error message from the callback function. It is the same message even when I try the ids from projects I downloaded in the past. Did anyone experience something similar??
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at /Users/tiago/Downloads/ct4all-9084ec92a0ada9c9ccc6897b7eb1153f6fba2447/Block/api/scratch-api-master/scratchapi.js:48:21
at IncomingMessage.<anonymous> (/Users/tiago/Downloads/ct4all-9084ec92a0ada9c9ccc6897b7eb1153f6fba2447/Block/api/scratch-api-master/scratchapi.js:37:37)
at IncomingMessage.emit (node:events:381:22)
at endReadableNT (node:internal/streams/readable:1307:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21)
This is probably because the Scratch Team decided to require a 'project token' to get the project, just so nobody now can view unshared projects in TurboWarp or smth. A project token is basically just a password to get the SB3 file of the project. Unfortunately, I don't know how to properly get it and this repository is probably dead.