save api_key as well