changed factory for api_token