Basic Usage
Welcome to the Gitoin API documentation! This page provides a comprehensive guide to integrating our API with your Roblox applications, enabling you to leverage our platform's features seamlessly.
Steps to Implement
Send Giftoin Function (Lua)
local HttpService = game:GetService("HttpService")
local function sendGiftoin(apiUrl, apiKey, dataTable)
local jsonData = HttpService:JSONEncode(dataTable)
local headers = {
["Content-Type"] = "application/json",
["x-gft-api-key"] = apiKey
}
local requestDetails = {
Url = apiUrl,
Method = "POST",
Headers = headers,
Body = jsonData
}
local success, response = pcall(function()
return HttpService:RequestAsync(requestDetails)
end)
if success then
if response.Success then
print("Data sent successfully! Response:", response.Body)
-- Process response data here if needed
return true, response.Body
else
warn("API request failed. Status code:", response.StatusCode)
return false, response.StatusCode
end
else
warn("Failed to send data: " .. tostring(response))
return false, response
end
end
local apiUrl = "https://api.giftoin.org/v1/api-reseller/api/v1/gcm/reseller/campaign/YOUR_CAMPAIGN_ID/order"
local apiKey = "YOUR_API_KEY"