Update rest.py

enable invitation