Everyone who successfully authenticates through Google account would be able to execute the API through the API Explorer.
I would like to limit the ability to execut
And,
endpoints.UnauthorizedException
if the user (endpoints.get_current_user()
) is not in the list.Python sample code:
if self.request_state.headers.get('x-referer') == "https://apis-explorer.appspot.com" and endpoints.get_current_user() not in MY_LIST:
raise endpoints.UnauthorizedException('Not Authorized')