I've read some similar cases where folks have encountered 404 errors despite having the correct organization ID and network ID.
One reason for this error is that your account might not have full access at the organization level. So check your account has the necessary permissions to access the network devices. You can check this by going to the Dashbaord > Organization > Settings and looking for the API access setting. Check the dashboard api is enabled for your organization.
Additionally, double-check your API key and ensure it has the required permissions. If you're using a read-only permission, it might not allow you to fetch network devices.
Only other reason for a 404 is the URI isn’t correct to what I can think of.
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io