Raise exception for missing api keys

This change is dependent on pull request #23 and includes necessary code.