If you are an ArcGIS Online organizational account, check your user role/privileges and the organisation settings. You can restrict non-admins from sharing content to the public.
If you are using a developer account, there were recent changes that disabled the ability to share certain hosted services to the public.
We recently disabled the ability to share certain hosted data services with the public for Developer accounts only. With the Data hosting feature of ArcGIS Platform coming out of beta on November 1st, usage is now metered on all hosted data services owned by Developer accounts only. In order to share any of your data with the public you must provide authentication to the service in the form of an API key or other authentication method. Please review the documentation atData hostingas well as themanage sharing and security section.
Hi @ChristopherCounsell Thanks for the heads up. I have a developers account so that explains the issue. Do you know if there is still a way to publish web maps or instant apps to the public using API keys without creating your own custom JS app if you have a developers account? And if it is possible, do you know any good online guides on how I could do that? It was so nice to just create web maps and instant apps and just share a link with anyone who was interested. Do you if there is any way to do that with API keys?