Debugging
Tips for debugging API requests and SDK issues.
Updated
On this page
Common Issues
1. "Unauthorized" Errors
// Check your API key is set correctly
console.log(process.env.NEXT_PUBLIC_DASH4DEVS_API_KEY)
// Should start with "pk_"
Tips for debugging API requests and SDK issues.
Updated
// Check your API key is set correctly
console.log(process.env.NEXT_PUBLIC_DASH4DEVS_API_KEY)
// Should start with "pk_"
If you see CORS errors in the browser console, check that your domain is in the allowed origins list. See CORS Errors.
import dash from "@/lib/dash"
const info = await dash.ping()
// Returns organization info if API key is valid
console.log(info)
// Show analytics debug overlay
dash.tracking.debug()
Open browser DevTools → Network tab to inspect API requests. Look for: