this is script please fix it because it says 404 not found: local cardsData = trello.GetRequest("https://api.trello.com/1/lists" .. trello.BanListID .. "/cards")
local cardsList = httpService:JSONDecode(cardsData)
seprate script but both need to be fixed
It seems that there are a few issues with your script. Here are the modifications that should fix the errors:
1. **404 Not Found**: This might be due to an incorrect URL format. Make sure there’s a `/` after `lists` in the URL.
2. **Typo in Method**: Ensure `Method` is set correctly.
3. **Data Field**: Use the `Body` field instead of `Data` for `RequestAsync`.
Here’s an updated version of your script with fixes:
```lua
local trello = {}
local httpService = game:GetService("HttpService")
-- Set up keys and tokens
trello.Key = script.Key.Value
trello.Secret = script.Secret.Value
trello.QueryParams = "key=" .. trello.Key .. "&token=" .. trello.Secret
trello.BanListID = "cant say"
-- Function to get data from Trello
function trello.GetRequest(url)
local requestUrl = url .. "?" .. trello.QueryParams
local response = httpService:GetAsync(requestUrl)
return response
end
-- Function to post data to Trello
function trello.PostRequest(url, queryData)
queryData['key'] = trello.Key
queryData['token'] = trello.Secret
-- Build query parameters
for name, value in pairs(queryData) do
if not string.match(url, "?") then
url = url .. "?" .. name .. "=" .. value
else
url = url .. "&" .. name .. "=" .. value
end
end
-- Set up request parameters
local request = {
Url = url,
Method = "POST",
Headers = {
["Accept"] = "application/json"
},
Body = httpService:JSONEncode(queryData) -- Use Body field instead of Data
}
-- Send the request
local response = httpService:RequestAsync(request)
return response
end
-- Example of how to use GetRequest with corrected URL
local cardsData = trello.GetRequest("https://api.trello.com/1/lists/" .. trello.BanListID .. "/cards")
local cardsList = httpService:JSONDecode(cardsData)
return trello
```
**Key changes**:
- Added a `/` after `"lists"` in the URL in `GetRequest`.
- Changed `Data` to `Body` in `RequestAsync`.
- Fixed `application/json` typo and other minor syntax adjustments.
This should resolve the issues and make your script compatible with the updated API. Visit taradownloader for more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting thing is that hydrogenexecutor.app still be able to bypass the jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
I tested the API endpoint you are using and it's working well. For any 404 errors, please look at typo errors in the full URI you are making the Get request to. In this case it is missing the '/' after the '1/lists':
trello.GetRequest("https://api.trello.com/1/lists" .. trello.BanListID .. "/cards")
For the rest of the script, I would highly recommend to review the information provided below and make sure you are using the correct API for making a Post request.
[Trello API] Get Cards in a List:
https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-cards-get
Also, for any coding or developer related inquiries, you can share your questions in our Trello developer community. We have a number of Trello Engineers that are active there, and they'd be happy to give some guidance for more advanced topics like these: https://community.developer.atlassian.com/c/trello
I hope this helps, but let us know if you have any questions!
----------------
If this post helps with your query, then please consider the Accept answer or Like button to help the other users find it more quickly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.