Roblox group APIs

For some reason still nothing.

Well I don’t know how the library you are using works but that is how headers are sent you should try to read the documentation to understand how it works and how to send headers. I suggest using axios which is also easier.

I may follow up with an update on this later

1 Like

If help I use this:
https://autocode.com/lib/http/request/#get

Test = cookie
123 = cookie think

Headers are sent as json. You need to change “Test” with “Cookie” and “123” with “.ROBLOSECURITY=your roblosecurity cookie”

1 Like

Tried now. Isn’t working. Still the same error.

Could you confirm the error message you’re getting? Is it still the same error?

1 Like

I always got this error.

{
  errors: [
    {
      code: 0,
      message: 'Authorization has been denied for this request.'
    }
  ]
}

send your new code so we can see how you are doing it. i would also suggest to test this with the code runner that is provided in the documentation you sent

1 Like

look up a tutorial on how to do that.

I have no experience with the currently library and usually just use noblox or something along those lines for all Roblox stuff, it makes stuff like this pretty much foolproof and pretty impossible to mess up on. I’ll try giving it a go in a bit and probably have a solution for you when I get the time to if you’re still experiencing this.

Just a quick question though, have you considered using noblox for this? They have something for group payouts. If so, is there a reason you’ve decided not to use noblox? I could provide some sample code using noblox if you wanted or another library I’m familiar with.

There is no tutorial for it. At least I didn’t found it.

Not sure what is NoBlox but if it’s like webpage I go and then there enter data then no. I need someone that I can use POST request.

Noblox is a node.js wrapper for Roblox. It provides sample code etc for basically everything you need to do. Of course if you don’t want to use this that’s fair, it’s just what I used whenever I did Roblox stuff and didn’t feel like doing stuff to send requests myself.

Either way I’ll check out the stuff you’ve provided in a bit with autocode and see if I can make it work if you don’t want to go this route! :slight_smile:

1 Like

Alright, I was busy most of today but I took a little look at the library you’re using. Here is what your code should look like sending the request. Tested it out myself with the website you provided and worked fine. Replace my groupId with yours obviously and place the cookie as well as X-CSRF where it says to.

const lib = require('lib')({token: null /* link an account to create an auth token */});

// make API request
let result = await lib.http.request['@1.1.6'].post({
  url: `https://groups.roblox.com/v1/groups/5206588/payouts`,
  headers: {
    'Cookie': `.ROBLOSECURITY=cookiegoeshere`,
    'Content-Type': `application/json`,
    'X-CSRF-TOKEN': `tokengoeshere`
  },
  params: {
    'PayoutType': `FixedAmount`,
    'Recipients': [
      {
        'recipientId': 1201454998,
        'recipientType': `User`,
        'amount': 1
      }
    ]
  }
});

Response paired with the audit log to show that this actually went through.


statusCode

Thx. You so much :hugs:. I will try it and see what I get.

1 Like

OK, I am on PC but not sure what is X-CSRF-TOKEN. Can you help me with it?

Alright, lets use an example of the website you provided. Send a request with a blank X-CSRF-TOKEN. If you did so correctly with a working cookie, you should receive a 403 back. If you look closer in the response, you should be able to see the X-CSRF-TOKEN. Copy and paste that.

This is my code. I put cookie like this?

headers: {
    'Cookie': `.ROBLOSECURITY=_DUAJRAN`, // Like this?
    'Content-Type': `application/json`,
    'X-CSRF-TOKEN': ``
  },