From 5 March 2019, the access to the ERA5 dataset has migrated from the Web API the Climate Data Store (CDS):

This article will help users with the migration:

How to migrate from ECMWF Web API to CDS API