How to sent POST requests to pastebin?

Hey there,

All I’d like to know is how to make a pastebin POST request, and it sucessfully works?

Heres my current code:

local http = game:GetService("HttpService")
local url= 'https://pastebin.com/kHqCU9Di'
local data = {
	['Two'] = "Not hello world!"
}
http:PostAsync(url,http:JSONEncode(data), Enum.HttpContentType.ApplicationUrlEncoded)
print("sucessish?")

Is prints “sucessish?” but the code on the side does not change, I’m not even a beginner to HTTP so I’d have no clue what to go off of, thank you! :slight_smile:

(Let me know if I’m unclear, I don’t know how to word my issue properly, I feel.)

1 Like

I have not examined Pastebin’s API before, but it seems you aren’t posting to a valid endpoint.
You are trying to create a new paste via their API, correct?

Not a new paste, trying to edit the current one, which is more than likely not possible, but I wouldn’t know. :slight_smile:

https://pastebin.com/api.php

Unfortunately, Pastebin does not provide an endpoint for updating. You could delete a paste and create another one, but their current API does not offer a way to edit.

2 Likes

Alright, thank you! Do you have any free recommendations for a site which I can send POST and GET requests to?

Pastebin still works for learning :slight_smile:
Log in to your account to get an API and read through the api docs I sent you
https://pastebin.com/api.php

I will, but i need a site I’m able to edit raw data and such, as I’m trying to store a players UserId/Username, and I was told trello isn’t meant to do such a thing. ( A small group of people, like beta testers. ) Datastores aren’t going to work for another plan I have with this. :slight_smile:

1 Like

You can use Google Spreadsheets as a Database as seen in this post. With the permissions of editing the database by their website and a mobile device.

2 Likes

Thank you! I’ll take a look. :slight_smile:

1 Like

Just a tip, I do not suggest interacting w/ APIs via HTTPService, it’s a pain.
Rather, setup a proxy-like system with NodeJS + Nginx to easily communicate with Spreadsheets API, and all you have to do is call it via HTTPService and provide a key as a means of authentication + security

2 Likes

I would suggest Trello personally. I actually use Trello for school, keeping up with my games, and a lot of other stuff. I also sometimes use it for data storage although Datastores tend to be enough.

Yes but it is not to be used as a database afaik shouldnt be treated like one. Ive only ever used it for off-sight bans ex: you’re on vacation and you need to ban an exploiter, but you do not have time to download roblox, sign in, and do 2 factor verification. :slight_smile:

1 Like