Photo: RNZ
Explainer - We carry our entire lives on our phones these days, but that also can make you particularly vulnerable when travelling to another country.
When visiting America, US Customs have the right to search your devices - as do many other countries.
After the return of Donald Trump to the presidency this year, there have been increased reports of travellers to the US denied entry and some detained in custody by Immigration and Customs Enforcement (ICE).
New Zealand has recently updated its advice to those travelling to the US to highlight the risks and what travellers may face, including inspection of your laptops, phones and tablets.
Is this legal, and is there anything you can do to protect your security? Here's what you need to know.
Hang on, US customs agents can legally search your phone?
They sure can. It is laid out clearly on the US Customs and Border Protection website.
Sophia Cope is a senior staff attorney with the Electronic Frontier Foundation in San Francisco, a nonprofit organisation that defends civil liberties. She said Customs have a wide remit to conduct inspections.
"Customs and Border Protection (CBP) asserts broad authority to search travellers' devices at ports of entry (like international airports), even devices of American citizens," she said.
US Customs claims the searches help fight crime before it enters the country.
The CBP defines "devices" to be: "Any device that may contain information in an electronic or digital form, such as computers, tablets, disks, drives, tapes, mobile phones and other communication devices, cameras, music and other media players."
"These device searches are unconstitutional," the Electronic Frontier Foundation writes on its website, calling searches "exceptionally intrusive".
The Fourth Amendment to the US Constitution protects people from unreasonable searches and seizures by the government, but border agents have been found to have wide exceptions under legal doctrine. Non-US citizens do not necessarily have all of the same guaranteed constitutional rights that American citizens do.
The US government claims that in 2024, less than 0.01 percent of arriving international travellers had their devices searched.
However, there has been a strong surge in immigration crackdowns since Trump returned to the White House.
Trump issued an executive order in January calling to "vet and screen to the maximum degree possible all aliens who intend to be admitted, enter, or are already inside the United States".
Customs has the right to vet and screen visitors entering the US. Photo: AFP / Getty Images North America
What happens if I say no?
If you're a non-citizen trying to enter the US, refusal to comply with a device search may result in being denied entry, Cope said.
"American citizens have the most leverage to refuse to comply because they must be let back into the country," Cope said.
"However, they can be detained for several hours, subjected to additional questioning, and their devices can be confiscated for days, weeks, or months."
US green card holders should also be let back in the country, but that has sometimes changed in recent months, she said.
"We've seen the current administration display a willingness to challenge green card status, and so these travellers should take that into consideration."
Donald Trump's administration has tightened border security. Photo: AFP
What will they look for on my phone?
"These searches have been used to identify and combat terrorist activity, child pornography, drug smuggling, human smuggling, bulk cash smuggling, human trafficking, export control violations, intellectual property rights violations and visa fraud, among other violations," the CBP website states.
CBP also says searches can be used to see what a visitor's "intentions" are in coming to the US:
"Furthermore, border searches of electronic devices are often integral to determining an individual's intentions upon entry to the United States and thus provide additional information relevant to admissibility of foreign nationals under US immigration laws."
The CBP says it can retain copies of information obtained from a border search if it contains evidence of violation of law, or more broadly, "if the information relates to immigration, customs, or other enforcement matters."
Data that is retained is kept in the CBP's systems, which it says have "robust access controls limiting user access to only those with a need to know".
CBP should not access data stored in cloud services, Cope said.
"CBP's 2018 policy expressly prohibits officers from looking at live cloud content on devices seized at the border/airports/other ports of entry. Border agents must put a device in airplane mode or otherwise disconnect it from the internet."
The EFF has put together an extensive digital privacy guide for travellers, she said.
Have New Zealanders had problems at the US border?
The Foreign Affairs Ministry updated its travel advice to New Zealanders in May, including warnings about possible detention at the border.
The US is under guidance for travellers to "exercise increased caution" on the government's Safe Travel website.
A spokesperson for MFAT said that as of late June, 16 New Zealanders had requested assistance with immigration difficulties in the US since January.
"This is made up of issues at the border and also in the community. It doesn't mean these people were detained," MFAT said.
MFAT's Safe Travel website warns that on arrival to the US, "your travel documents, reasons for travel, or belongings (including electronic devices) may be subject to scrutiny and inspection".
Is my social media going to get me in trouble?
There have been multiple reports of people visiting the US having trouble at the border over political speech.
Australian Alistair Kitchen was detained and questioned about views on Israel and Palestine before being deported from LA to Melbourne.
He told RNZ's Jesse Mulligan that his name was called over a loudspeaker before he was even through the Customs queue.
"I was pulled into the back room and my phone was demanded and my passcode was demanded and I realised at that moment that this wasn't random or ad hoc but they had been waiting for me, and they told me as much.
Australian writer Alistair Kitchen. Photo: Supplied
"They said, the reason you're here is because of these posts you wrote online about the protests at Colombia (University)... and I had taken those posts down days before I got on the plane."
The Department of Homeland Security has denied Kitchen was deported over his political views.
"The individual in question was denied entry because he gave false information on his ESTA application regarding drug use," it said in a statement, although Kitchen maintains he was first singled out for screening over his political posts.
Social media can leave plenty of traces even if they are not on your phone.
"Social media apps can contain cached or copied content that is on the device's hard drive, even though the original content is principally stored on the social media company's servers," Cope said.
"Thus, when a device is in airplane mode, some of that content may be viewable on the device, even if it's otherwise private. As such, people can delete those apps for the purpose of travel and reinstall them later to avoid border agents accessing cached private social media content."
A New Zealand telecommunications expert who asked not to be named told RNZ that "I suspect if you've been online telling everyone what you think about Donald, it's too late" even if you delete information from your phone.
The expert said that the information is out there and seen by companies such as Peter Thiel-founded mass surveillance technology company Palantir.
"If apps are deleted on a phone but an officer knows ahead of time about a traveller's social media, the lack of the apps on the phone might lead to more scrutiny and questioning," Cope said.
"I had prepared," Kitchen said. "You go through the passport control and you do make sure that your social media has been cleaned up, that your phone is missing messages that might have been critical of Donald Trump, for example. ...In my case, it was not sufficient exactly because they had already done this background search on me."
US Immigration Customs and Enforcement teams - ICE - have been cracking down on illegal immigration. Photo: US ICE
Do other countries do this too? What about New Zealand?
Many other countries can also search your phone at Customs. In New Zealand, Customs has had the power since 1996 to examine all goods crossing the border, including devices.
However, Customs said "officers must have 'reasonable suspicion' of criminal offending before searching an electronic device and must have "reasonable cause to believe" that an electronic device has offending material on it before detaining it".
If you refuse access, courts can impose a penalty of up to NZ$5000 - but this is only possible if Customs decides to prosecute the traveller.
Customs claims on its website that most passengers entering New Zealand do not have their devices searched.
So should you wipe your phone or bring a burner phone?
The advice from some tech experts is to make a plan before travelling if you're concerned about data on your phone - but it might not be a good idea to buy a pristine cheap "burner" phone for a trip.
"We've heard anecdotally that travelling with a temporary device or an otherwise "clean" device devoid of any personal information can itself raise suspicions with border officers," Cope said.
"At the same time, travellers may have very sensitive information on their devices, especially if you're someone with ethical or legal obligations for confidentiality such as a journalist, attorney, or doctor.
"But even average people may have personal photos or texts or emails that reveal sensitive or intimate things about themselves or their families that they wouldn't want a US federal agent to see.
"People should therefore think about what privacy interests they have and mitigate their risks - both of a privacy invasion and of being denied entry or escalating an interaction with a CBP officer - to the extent they feel comfortable."
Sign up for Ngā Pitopito Kōrero, a daily newsletter curated by our editors and delivered straight to your inbox every weekday.