Kudos on the good error message here!

Python has a pretty featureful `set` type; I think it'd help here. For instance:

    required_fields = set(['client_id', 'client_secret', 'refresh_token'])
    missing_fields = required_fields.difference(client_credentials.keys())
    if missing_fields:
      ...