There's not a lot you can do.
As part of their mission to protect the country, border agents enjoy broad power to question and search anyone entering the U.S. But as more travelers show up with smartphones and social media accounts in hand, some are asking how far this power should extend in the digital age.
The issue arose last year when a new travel form asked foreigners about their social media accounts, and it bubbled up again following Trump’s recent immigration order banning travel by citizens of seven countries. Most notably, an advocacy group filed a complaint with U.S. Customs and Border Protection, claiming agents are subjecting the phones and social media accounts of Muslim-Americans to extra scrutiny.
This raises hard questions for travelers: What to do if a border agent asks to see your Facebook feed, or your handle for another social media account like Twitter? The issue, from a privacy perspective, is these accounts offer an enormous window into a person’s life: Friends, photos, and sexual orientation, not to mention political and religious views, are all on display.
The border agents’ power, from a legal perspective, is complicated (you can read more below). But from a practical point of view, the answer about how to handle requests for social media information comes down to how much you want to be inconvenienced.
According to Sophia Cope, an attorney with digital rights group Electronic Frontier Foundation, border guards must let you into the country if you are an American citizen. This means, in theory, you can decide to say nothing about your social media activity and refuse to unlock your phone. But the flip side is the agents can detain you for so-called “secondary inspection” for hours. They also have the right to seize your phone.
Cope says, if border agents do seize your phone, they have to return it—although that can take weeks or even months to do so in some cases. She says Americans who are really concerned about their privacy might consider deleting apps or wiping content from their device before they arrive at the border. (Though travelers with brand new phones, or ones that contain no data, might also arouse suspicion and lead to an interrogation).
Get Data Sheet, Fortune’s technology newsletter.
As for the border patrol, the agency believes searches of social media and travelers’ devices are well within its rights. The reason lies with the so-called “border exemption”—a legal rule that puts border searches outside the Fourth Amendment, which requires a warrant for search and seizures. Travelers should also note this exemption doesn’t exist only at the frontiers of Canada and Mexico. It can also apply at immigration areas in inland airports, and in a so-called “border zone” that extends 100 miles inland.
Finally, the situation is totally different for those who are not American citizens. Foreigners can, of course, refuse to answer certain questions or refuse to share their social media information, but border agents can respond by refusing them entry to the country. (As for green card holders and others with residency rights, most legal scholars think they are in a grey area).
New Privacy Rules for a Digital Age?
Activists aren’t the only ones taking notice of how much information phones can give up. In a landmark 2015 case called Riley, the Supreme Court decided that police could no longer search suspects’ phones unless they got a warrant.
The unanimous ruling has led some to say the Supreme Court’s reasoning—that cell phones contain so much information that a search warrant is required—should be expanded to other situations, including the border.
Cope, the lawyer for EFF, shares this view, and argues the “border exemption” needs to be narrowed. She points out the exemption’s traditional purpose, which is to let agents search luggage for contraband, doesn’t really apply in the case of cell phones or social media accounts.
Meanwhile, an appeals court in California has already shrunk the border exemption a little bit by saying agents must get a warrant if they want to do a forensic search of a traveler’s device. But the court also found a more basic search, presumably including a glance at a phone and its social media accounts, is okay.
The lack of a broader framework for digital device searches has also led law professor Orin Kerr, a leading privacy scholar, to suggest defense lawyers should ask judges to look for “Reilly moments,” and do more to distinguish digital searches from physical ones.
Security hawks, however, are likely to resist any attempt to limit social media searches since Facebook and other accounts reveal valuable information about people’s ideas and associations.
In any case, social media searches at the border are likely to become more common in the near future, especially given President Trump’s desire for aggressive immigration enforcement. While Congress or the courts could step in to limit such searches, that could take years.