trigger:
set {_uuid} to uuid of player
replace all "-" in {_uuid} with ""
send a "POST" request to "https://mc.astrolabs.net/index.php?route=/api/v2/integration/verify" with the body "{""integration"":""Minecraft"", ""code"":""%arg-1%"", ""identifier"":""%{_uuid}%"", ""username"":""%player%""}" and the headers "Authorization: Bearer <code>"
set {_reporter} to last http response
send {_reporter}```
I'm attempting to get {_uuid} to work in the body of the post request but it throws me this error. If I input the uuid manually by doing ``0ef1ad52a6a947d399227f60dccdd2cd`` instead of ``%{_uuid}%`` in the body of the post request, it'll work, but if it's the other way around it won't work, it throws the error as shown.
#Reqn Post Request
1 messages · Page 1 of 1 (latest)
yoo
👋
igh so, ion know to much abt api, i made a stock market skript once, so ill try, waht kinda api is it
It's using NamelessMC's API
?
ur sending a post request
Yeah, a post request that is being used for NamelessMC
well are u trying to get inforamation about something, or give information to the api?
Give information
ohh
That's what I'm doing the post portion for
idk waht it is tho,. and i think it might be the fact u gotta seperate ur body stuff, like, with headresr "" and "" with headers "" and ""
No, because %arg-1% is able to be detected by the body json, but when it comes to a variable, it doesn't want to do it.
ah, u gotta ask pichachu then, i only did one api project a while ago, and i struggled
I'd recommend trying skript-json to make the body
that'll ensure you aren't making any json errors
I did that before but I'm not sure if I was doing it wrong, how would I do that.