Skip to end of metadata
Go to start of metadata

Problem

ecmwfapi.api.APIException: u'ecmwf.API error 1: Invalid or missing key or token'

Solution

There are 3 possible issues for this error:
  1. The file .ecmwfapirc does not exist or has an invalid format
    1. You should go to https://api.ecmwf.int/v1/key/ and copy exactly the content of the text box into the file $HOME/.ecmwfapirc
  2. Your token has expired:
    1. Logging in to https://api.ecmwf.int/v1/key/ will trigger the creation of a new one. Just replace the old one with the new one. 
  3. Your token has been manually disabled by our operators
    1. You should have received an email explaining the reason for that. If that is not the case, contact us.