Group Payout API not working as expected, recipient is invalid response error

  1. What I am trying to do:
    Auto group payout (Fixed, meaning robux per player, not percentage)
  2. The issue:
    When I send a request through the rprxy.xyz proxy server, with all the valid headers and request body, it says that the recipient is invalid (they are in the group). https://gyazo.com/430f92f515a0598b3539502bf112b37f
  3. Attempted solutions:
    I can’t find any solution or anything relating to this issue, I’ve been trying to get this fixed for hours.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local table = {
	["PayoutType"] = "FixedAmount",
	["Recipients"] = {
		["recipientId"] = 1205819337,
		["recipientType"] = "User",
		["amount"] = 10,
	}
}

local json = httpService:JSONEncode(table)
local decoded = httpService:JSONDecode(json)
print(json)

local payOut = httpService:RequestAsync(
{
	Url = "https://groups.rprxy.xyz/v1/groups/4884330/payouts",
	Method = "POST",
	Headers = {
		Cookie = ".ROBLOSECURITY=myroblosecurity",
		["X-CSRF-TOKEN"] = thecsrf,
		["Content-Type"] = "application/json"
	},
	Body = json
})

print("Response Body: "..payOut.Body)

Roblox API Doc URL: https://groups.roblox.com/docs#!/Revenue/post_v1_groups_groupId_payouts

Recipients is a single dictionary, whereas the API docs suggest submitting a list of dictionaries instead.
Try putting another {} around the recipient dictionary.

1 Like

I’ll give it a try. 30 charssssssss

Uh so now it says [Response Body: {“errors”:[{“code”:25,“message”:“The amount is invalid.”,“userFacingMessage”:“The amount is invalid.”}]}]

Is this because I don’t actually have any robux in the group or… because there is a specific error for insufficient robux and it isn’t this one.

Fixed now, thank you for the help!

How do I obtain the CSRF token?

send get request to “Roblox” with .ROBLOSECURTY cookie and response should contain Roblox.XsrfToken.setToken(‘weird token here’);