In several cases over the last couple of years, the police have highlighted WhatsApp chats found on phones to explain why they needed to keep people in custody.

This strategy has been deployed most recently in narcotics cases involving Hindi film actress Rhea Chakraborty and Aryan Khan, the son of film star Shah Rukh Khan. It has previously been used against activist Umar Khalid and others in the Delhi riots case.

Last week, there were reports of the Hyderabad police stopping people in the streets and checking their phones to see if their WhatsApp chats contained conversations about drugs.

However, many legal experts say that this is completely illegal. One researcher has sent the Hyderabad Police a legal notice asking them to stop these “roving and fishing enquiry with no legal basis”.

This has left many ordinary people wondering what the powers of the police are in this regard and whether they can actually conduct such searches of phones.

What has happened?

The legal notice sent by independent data and privacy researcher Srinivas Kodali to the Commissioner of the Hyderabad Police, with the help of a civil rights organisation called the Internet Freedom Foundation, says that the police requires a “judicial warrant” to search phones. Otherwise, the search can only be undertaken “during an investigation...[with] recorded reasons explaining the need for urgent and immediate police intervention”.

The notice asks the police to produce the warrants or departmental notices or instructions directing such conduct.

Kodali was reacting to a video that went viral on Thursday showing the Hyderabad Police stopping people in the streets and asking them to unlock their phones. People were sent to the police station if messages with words such as “ganja” or weed” were found.

Gajarao Bhupal, Hyderabad Deputy Commissioner of Police, South Zone, told The Newsminute that those who had been stopped had voluntarily given their phones to the police. They had the option to refuse, he said. But he added: “However, we will then have to see what legal provisions apply.”

Many have questioned how consensual this process could actually be, especially since the searches were conducted in neighbourhoods inhabited by people from lower-income groups, where the power balance is tilted in favour of the police.

What powers of search do the police have?

Under the Code of Criminal Procedure 1973, which lays down the procedure to be followed in criminal cases, the police have the power to conduct searches only when they are investigating an offence. Various legislations also give the police the power to conduct searches to prevent an offence from being committed. However, “there are no generalised powers of search to stop people at random, and search, as I understand”, said Jawahar Raja, a criminal lawyer.

Shreya Munoth, a Delhi-based lawyer, explained the various methods of conducting a search. “There has to be a written notice [under Section 91 of Code of Criminal Procedure] or a search warrant [under Section 93 of Code of Criminal Procedure] if someone wants to conduct a search,” she said.

The police also have a general power of search, which would come into play in instances like the Hyderbad incidents. These are governed by Section 165 of the Code of Criminal Procedure, which says that if an officer making an investigation has “reasonable grounds for believing” that information for a case needs to be “obtained without undue delay”, he can conduct a search after “recording in writing the grounds of his belief” and specifying what he is searching for.

“This section is used when they have a suspicion that something was used in the commission of an offence and if it would create undue delay, they can conduct searches without a search warrant or a notice,” Munoth said. “But there has to be reasonable suspicion of an offence, such as someone is seen smoking a prohibited substance. Just because I’m riding my bike in Hyderabad, does not meet that threshold in my opinion.”

She also noted that the reasons for the police action have to be recorded in writing.

“There is no overarching broad power that the police can either come and say that the police can come and ask to see your phone,” she said. “In fact, there is a presumption against the criminality of citizens. You cannot treat your citizens as criminals unless there is a suspicion to do so.”

Jawahar Raja said that the police are empowered for specific articles if they want to conduct a search, such as them asking you to show your vehicle papers or driving license. “The Motor Vehicles Act gives a specific statutory stipulation that gives the police the power to stop you and ask you for your vehicle papers. Where the intention was to confer that power, that is done under law.” While there are stipulations for search for drug-related crimes under Narcotic Drugs and Psychotropic Substances Act 1985, it prescribes strict conditions and does not allow for generalized searches as the Hyderabad Police seemed to be conducting, he pointed.

There are also legislations such as the Copyright Act 1957 that prescribe the powers of search to the police. However, they also would not make such a general search legal. “To the best of my knowledge, none of these acts gives the kind of powers to conduct generalised stop and searches [like in Hyderabad],” Jawahar Raja told Scroll.in.

Can one refuse if the police ask for your phone?

As noted above, legally, a person is entitled to say no if the police ask them for their phone without a solid reason.

There is a constitutional protection against this. Article 20(3) of the Indian Constitution says that “no person accused of an offence shall be compelled to be a witness against himself.” This means that no one can force you to give evidence against yourself. It is commonly known as ones’ right to remain silent. If the officer has the power to conduct a search, then she can search you and your phone.

However, the lawyers Scroll.in spoke to pointed out that while a procedure exits on paper, it plays out differently in real life. If the police repeatedly ask for your phone, it is generally better to cooperate.

However, there are some steps people could take to protect themselves. “Knowing your rights helps you with the power differential,” said Munoth. “If they [the police] insist then you have to ask under what provision, what offence or under what suspicion your phone is being asked for. Ask them for a notice or a search warrant.”

Lawyers also say that asking for the police to put down their request and their reasoning in writing would help as a last resort. “If they do not provide reasons, then get them to ask you for it [your phone] in writing,” said Munoth. “If they still insist, then try to get in touch with a lawyer.”

Raman Jit Singh Chima, Asia Policy Director and Senior International Counsel at Access Now, a digital rights organisation, also pointed that it is better to cooperate, but at the same time to “insist everything is recorded, evidence is kept and even after the incident, it is documented”.

What can one do in these cases?

Incidents like those in Hyderabad have occurred in other countries as well. “Stopping someone, getting them to unlock their phones, getting their contact list to even cloning the device for the contact list, is very common in authoritarian contexts,” Chima said, pointing to similar searches in Myanmar and Afghanistan.

There is guidance on this that people can follow, he added. “Other stuff depends on context,” Chima said. “If you are worried that you are being [or will be] targeted, speak to experts. Since the advice we give is based on your threat matrix – who might be trying to compromise you, what accountability do you have, what capability does your adversary have. There are also resources to help you out on this.”

Chima told Scroll.in that the Indian law, being dated, is ill-equipped to deal with searches that involve electronic devices. “India’s law regarding search and seizure of devices is stuck in the mid-20th century,” he said. “The police are very keen to not have this questioned, to not have this law touched or updated.”

He noted that most criminal investigations of this sort are governed only by the Code of Civil Procedure, even though legislations such as Information Technology Act 2000 should also apply. He argued that even laws like the Information Technology Act need to be updated. “You need new laws or updated consolidated laws,” he said.