fixed  api endpoint to return correct scopes