@requires_auth
    def impersonate(self, scopes=None):
        url = self._build_url('admin', 'users', self.id, 'authorizations')
        data = {}

        if scopes:
            data['scopes'] = scopes

        json = self._json(self._post(url, data=data), 201)

        return self._instance_or_null(Authorization, json)
Obtain an impersonation token for the user.
dataset/ETHPy150Open sigmavirus24/github3.py/github3/users.py/User.impersonate