Added validate to validate appid and secret