Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchclient - A scratch API wrapper for python
- nini2009ph
-
87 posts
scratchclient - A scratch API wrapper for python
(#560)use websockets and connect to the scratch servers
can you tell me how you made this?
I am interested in making one to suit my needs

- SomeoneOnThelnternet
-
1000+ posts
scratchclient - A scratch API wrapper for python
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
male | he/him or they/them | forumer (obviously) | PST | 2000+ posts | between 5 and 100 years old
Go join ScratchCraft!
LINKS:
profile | 2000th post | more coming soon…
- mrcoat
-
84 posts
scratchclient - A scratch API wrapper for python
(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
My cartoon
Watch My Show!
I was gonna put an image of the studio but it didn't work.
Cool thing I made
when [Awesomeness v] > (100)
forever
play sound [Victory v] until done
set rotation style [The best style v]
go to [The party v]
end
- SomeoneOnThelnternet
-
1000+ posts
scratchclient - A scratch API wrapper for python
Ok, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
male | he/him or they/them | forumer (obviously) | PST | 2000+ posts | between 5 and 100 years old
Go join ScratchCraft!
LINKS:
profile | 2000th post | more coming soon…
- mbrick2
-
1000+ posts
scratchclient - A scratch API wrapper for python
Ok, I just mainly want to see user followers and project stats and whatnot. How do I use the API?
With python you do this
import requests user = "chiroyce" data = requests.get(f"https://api.scratch.mit.edu/users/{user}")
the data variable will have this JSON output
{ "id": 58524660, "username": "Chiroyce", "scratchteam": false, "history": { "joined": "2020-03-25T08:04:04.000Z" }, "profile": { "id": 57596999, "images": { "90x90": "https://cdn2.scratch.mit.edu/get_image/user/58524660_90x90.png?v=", "60x60": "https://cdn2.scratch.mit.edu/get_image/user/58524660_60x60.png?v=", "55x55": "https://cdn2.scratch.mit.edu/get_image/user/58524660_55x55.png?v=", "50x50": "https://cdn2.scratch.mit.edu/get_image/user/58524660_50x50.png?v=", "32x32": "https://cdn2.scratch.mit.edu/get_image/user/58524660_32x32.png?v=" }, "status": "A few things... \n\nAlso any comments talking about the troll asking people to report me WILL be deleted!!", "bio": "| Boy | 14 | Python | ATer | Tech | Cars | \n| Cameras | Forums | Cricket | ☁️ Cloud |\n\n» Alt — @Chirover\n» PFP — @--Air--\n\nAlso no F4F or ads", "country": "India" } }
or you can use ScratchConnect which has it premade




My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage
The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26
Card Made By @Polygon

Card Made By @Polygon
- ajsya
-
1000+ posts
scratchclient - A scratch API wrapper for python
If you just want to use the Scratch API and good solution for you could be ScratchLink: https://github.com/Sid72020123/scratchlinkOk, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
Feel free to message me on my profile if you need to tell me something/want someone to talk to.
Hi, I'm ajsya!
| Roblox | GitHub | Wiki | My Posts | Scratch Empires | Scratch Weather App | Minecraft Server Pinger |
Before creating a new topic on the forums search Ocular to see if one already exists!
| Roblox | GitHub | Wiki | My Posts | Scratch Empires | Scratch Weather App | Minecraft Server Pinger |
Before creating a new topic on the forums search Ocular to see if one already exists!
- Sid72020123
-
500+ posts
scratchclient - A scratch API wrapper for python
Or ScraGet: https://github.com/Quantum-Codes/ScraGetIf you just want to use the Scratch API and good solution for you could be ScratchLink: https://github.com/Sid72020123/scratchlinkOk, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
- watchthepro
-
3 posts
scratchclient - A scratch API wrapper for python
how to send a variable to a python from scratch?
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
I had this problem too. I can't get it to edit cloud variables even when signed in how to send a variable to a python from scratch?
Some help?
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- completeness
-
100+ posts
scratchclient - A scratch API wrapper for python
Last edited by completeness (Aug. 10, 2022 16:45:00)
- 9gr
-
1000+ posts
scratchclient - A scratch API wrapper for python
(#570)Impossible since @Raihan142857 is banned RIP
Woah, some big changes happened.
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
One has learnt YmysyloOne's speech pattern and will include it in One's posts occasionally. Do not be afraid about this decision.
For reference:
[quote=MagicCrayon9342]make the thing before announcing it[/quote]
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the script
print("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
Last edited by AdamKRPS425 (Aug. 31, 2022 09:48:44)
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the scriptprint("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
and now why is this not working
print("logging on...") session = ScratchSession("adamkrps425", "password") session.get_user("adamkrps426").post_comment("test")
sheesh nearly leaked my password! lol
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
Well, for me, a modified version of the code works perfectly fine! and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
print("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("DifferentDance8", "https:/scratch.mit.edu/discuss/youtube/34Ig3X59_qA in order to get my password") print("connecting to project...") connection = session.create_cloud_connection(726705370) print("setting var...") connection.set_cloud_variable("cloud", 1) print("done!")
And on the project, “cloud” is now “1” instead of “0”!
One has learnt YmysyloOne's speech pattern and will include it in One's posts occasionally. Do not be afraid about this decision.
For reference:
[quote=MagicCrayon9342]make the thing before announcing it[/quote]
- AdamKRPS425
-
42 posts
scratchclient - A scratch API wrapper for python
really I would appreciate any helpwhat could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the scriptprint("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
and now why is this not workingprint("logging on...") session = ScratchSession("adamkrps425", "password") session.get_user("adamkrps426").post_comment("test")
sheesh nearly leaked my password! lol
very unfortunately, my forum signature was eaten by an evil wizard and has now run away.

evil wizard code::events hat
forever
if <stolen forum signiture> then
laugh [he he he!] [quietly! v]
run!!!
end
end
hi
hi!
hi!
————
| . . |
| ____ |
| / \|
————
————
| . . |
| ____ |
| |
————
————
| . . |
| \____/ |
| |
————
you have reached the end of the animation.
BYE!!!
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
Do you get a “scratchclient.ScratchExceptions.UnauthorizedException” error (meaning a 403, and I looked through the code), or a “scratchclient.ScratchExceptions.InvalidCredentialsException” error (meaning, well, your credentials are incorrect)? really I would appreciate any help
One has learnt YmysyloOne's speech pattern and will include it in One's posts occasionally. Do not be afraid about this decision.
For reference:
[quote=MagicCrayon9342]make the thing before announcing it[/quote]
- Discussion Forums
- » Advanced Topics
-
» scratchclient - A scratch API wrapper for python