Failed to post card: 401 Unauthorized

trello.QueryParams = "&key=" .. trello.key .. "&token=" .. trello.Secret
function trello.PostRequest(url, data)
	data['Key'] = trello.key
	data['token'] = trello.Secret
	url = url.."?idList="..trello.BlistId..trello.QueryParams.."&name="..data['name']

	local request = {
		Url = url,
		Method = "POST",
		Headers = {
			["Content-Type"] = "application/json",
			["Accept"] = "application/json"
		},
		Body = httpService:JSONEncode(data)
}

I gave all the permissions possible for the API token and yet I get unauthorized also the board is public