Updated the api refresh task to check main_char_id