Get fresh Discord CDN URLs with new 24-hour expiration (mapped to storage domains)
POST/refresh
Body:
{ "channelId": "...", "messageId": "..." }
GET/refresh/:channelId/:messageId
Example:
GET /refresh/1468455916839108771/1468460654519390332
curl -X POST http://localhost:3001/refresh \
-H "Content-Type: application/json" \
-d '{"channelId":"YOUR_CHANNEL_ID","messageId":"YOUR_MESSAGE_ID"}'
const response = await fetch('http://localhost:3001/refresh', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
channelId: '1468455916839108771',
messageId: '1468460654519390332'
})
});
const data = await response.json();
console.log(data.files[0].url);
import requests
response = requests.post('http://localhost:3001/refresh', json={
'channelId': '1468455916839108771',
'messageId': '1468460654519390332'
})
data = response.json()
print(data['files'][0]['url'])