read token from gallery