added functionality for external api keys
Merge branch 'external-api'