trim the api key