Three senior generals have already been detained in the wiretapping scandal, including General Listyo Sigit Prabowo, who had been named chief of staff to President Prabowo Subianto in October.
Listyo previously served as national police chief under Widodo, though the former president has not been implicated in the wiretapping investigation.
As well as Prabowo, there are allegations that cabinet officials, politicians, journalists, civil society leaders and business executives were also subjected to unauthorised surveillance.
Police allege the unauthorised wiretapping took place between 2025 and 2026, after Prabowo had been elected and while Listyo was still national police chief.
National Police Legal Division head Inspector-General Ahrie Sonta Nasution and Inspector-General Eko Hadi Santoso, a senior instructor at the National Police Education and Training Institute, were also detained.
Since arresting the generals, the government has called in more than 20,000 troops to Jakarta and on Thursday said 6770 police and military personnel had been deployed to secure Widodo's hearing.
Widodo was called to testify in a defamation trial stemming from allegations that he used a fake university diploma.
As he arrived on Thursday morning at the East Jakarta District Court, the former president was welcomed by hundreds of his supporters who chanted messages of encouragement as he entered the building.
The presidential palace has said the wiretaps were being considered an "act of treason" that endangered state interests, but has not linked the deployment of troops to Jakarta to the case.
On Thursday, East Jakarta Police chief Alfian Nurrizal said the deployment of the thousands of police and military personnel was simply a precautionary measure due to potential security risks and large crowds, and that most of the forces were being held on standby.
"The actual deployment would be adjusted based on conditions at the courthouse," Nurrizal said.
Despite the number of troops sent to Jakarta, there has also been no visible military presence on the streets and authorities have said most are being held in reserve in barracks and other facilities.