API:Allmessages/Sample code 1