1SickGui
(Sick)
January 30, 2022, 9:08pm
#1
So I wanted to write some Python code that would update the status of a group, but when I ran it, it returned the following error: “Authorization has been denied for this request.” Could someone please assist me with this because I am not very good with Python? Here is my code:
import requests
payload = {"message": "string"}
payloaddata = {'username': "XXX", 'password': "XXX"}
r = requests.patch('https://groups.roblox.com/v1/groups/XXX/status', json=payload, data=payloaddata)
print(r.text)
print(r)
3 Likes
dinat13
(BerVrem)
January 30, 2022, 9:27pm
#2
I don’t know anything in Python but I assume you would have to use your cookie instead of an username and password
1SickGui
(Sick)
January 30, 2022, 9:37pm
#3
Where inside of the payload would I have to put my cookie
dinat13
(BerVrem)
January 31, 2022, 3:34pm
#4
You would have to delete username and password and replace it by cookie ig
Also you should probably use ro.py and do this:
from roblox import Client
client = Client("your token")
group = client.get_group(0000000)
r = group.shout("string")
print(r)
local_ip
(jmk)
January 31, 2022, 4:03pm
#5
This, and the other quirks of the Roblox web API, are explained here:
Accessing the Roblox Web API
The Roblox API is extremely powerful - it can be used to create anything from group ranking bots to game statistics websites.
As a developer, there are two main ways you’ll want to access the Roblox API: sending the requests yourself or using one of the multiple wrappers for your favorite programming language. In this tutorial, I’ll go over both of these methods.
Notes
This tutorial currently offers Python code examples. To contribute and add a programmin…
As mentioned earlier by @dinat13 you may want to use a web API wrapper (like ro.py) which simplifies things considerably.
3 Likes