Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My HTTPservice returns InvalidUrl?

Asked by 5 years ago
Edited by User#19524 5 years ago

Alright so I decided to check out this noblox-js library by suufi today, and followed the entire tutorial included the Node.JS part.

Now I'm here creating a ModuleScript called Server, putting the provided code in there. In order to access my server I have to connect using my domain and key.

Whenever I try and call my URL, it tells me the url is invalid. This url certainly works because when I paste it in my browser, something comes up.

Any ideas?!

local server      = require(script.Parent.Server)
local domain = 'censored domain' --URL that is claimed to be invalid
local key = 'censored key'
local groupId = 1234
local userId = game:GetService'Players':GetUserIdFromNameAsync'RegisteredCode'
local api = server(domain, key, groupId)
print(api.promote(userId).message)
print(api.message(userId, 'Subject', 'Body').message)
print(api.getBlurb(1).data.blurb)
1
Censored your URL and key. Someone might do malicious stuff with it. User#19524 175 — 5y
0
Cheers. That key was already changed when I posted it, but the URL wasn't. User#20989 0 — 5y
0
Use HttpService:RequestAsync() because it gives more descriptive error codes. And im gonna take a guess that your server doesnt like whatever headers you are sending (if you are sending any at all) MessorAdmin 598 — 5y

Answer this question