Redo whole example to fix for newer versions of apis.
reduce needed permissions