Problem with embed url in webhooks

Hello everyone, I have a problem with a Report system with Discord webhook integration. The problem is the url I try to put in the embed, it works perfectly fine with other links, but when I try to put custom arguments it gives a “HTTP 400 (Bad Request)” error, the pinned screenshot shows it
image

This is the piece of code, the problem is at the [“url”] line

local Data = 
            {
                ["content"] = " ",
                ["embeds"] = {{
                    ["title"] = "Report",
                    ["url"] = "roblox://experiences/start?placeId="..placeid.."&gameInstanceId="..jobid,
                    ["description"] = reason,
                    ["type"] = "rich",
                    ["color"] = tonumber(0xff1e00),
                    ["fields"] = {
                        {
                            ["name"] = "Target",
                            ["value"] = target,
                            ["inline"] = true
                        },
                        {
                            ["name"] = "Reported by",
                            ["value"] = player.Name,
                            ["inline"] = true
                        }
                    },
                }}
            }

I used the link example in Bloxtrap’s rich presence “Join server” button.

1 Like

you should try using the tostring() function for the PlaceId and JobId

should look like this:

["url"] = "roblox://experiences/start?placeId="..tostring(placeid).."&gameInstanceId="..tostring(jobid)

I tried to use tostring() already, but it doesn’t do anything at all. Though the url does work on simple links like youtube or something, but does not work with “…tostring()…”, still gives the bad request.

I‘ve tried inserting your link into multiple discord embed editors and they all said the same. The Link is invalid.

If you can tell me what what you’re trying to achieve by this link, i may help you out.

So, as I said, I ripped the link from Bloxstraps source code for Rich Presence button “join server”. Usually, when I click it, it just launches roblox. Here’s the screenshot of the code I modified.

Turns out the url can be only https:// and not roblox://(which opened roblox and which I used). I will still experiment with this to get better result though. (edited)

You’re probably trying to get into a certain server, right? I tried making custom links too back when i was making an admin panel, but it just wouldnt work. so i simply sent the jobid through the webhook and made a prompt ingame to insert the jobid and then you can simply use

game.TeleportService:TeleportToPlaceInstance(game.PlaceId,Jobid,player.UserId)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.