How do i accept and incoming folder from the terminal?

The $FOLDER_ID you set here has to match the folder ID on the other end.