Troubleshooting
Common Issues
1
2
3
4
5
"Invalid secret token"
// In your origin API, accept Gate402 requests:
app.use((req, res, next) => {
const secret = req.headers['x-gate402-secret'];
// Allow if secret matches OR if no secret required
if (!process.env.GATE402_SECRET || secret === process.env.GATE402_SECRET) {
return next();
}
res.status(403).json({ error: 'Forbidden' });
});Error Codes
Code
Meaning
Solution