The uprisings against American-installed autocrats in Iran and Nicaragua are new illustrations of an old sickness of U.S. foreign policy. Twice again we have pursued our diplomatic aims through the expedient of propping up dictators, twice again that policy has brought us to the edge of defeat and disgrace.

How easy it seems, in the begginning, to foster our interests in a foreign land by buying up one leader and arming him to the teeth, thus to maintain him against all opposition within his country. How much simpler this is for our diplomats and generals than to cope with the complex currents of a distraught society or to reconcile our tactics with our professed principles.

But how pathetic in the end, as we are reminded anew by the flight of American citizens from Tehran, how isolated and discredited is our posture through the dam of American-equipped repression and sweeps away our client kings.

In Nicaragua, where Anastasio Somoza once displayed on his currency the portrait of a former American ambassador. President Carter today seems to be making a twelfth-hour effort to broaden our support and to stave off the consequences of a long-term American policy that invented the Somoza dictatorship and upheld it for decades.

But in Iran, ruled by Shah Mohammad Reza Pahlavi, another creation of the United States, President Carter's policy is as one-dimensional as that of his predecessors. It can be summed up in a telephone message from presidential adviser Zbigniew Brzezinski to the beleaguered shah: Do whatever you must do to restore authority and stability; whatever that may be we are 100 percent behind you.

Usually our diplomats' rationale for going down with the ship is the same one they used to arm and provision it in the first place: It is the only alternative to a communist takeover. It comes as no surprise, therefore, that Brzezinski is deftly spreading the word that the Kremlin is behind the revolt in Iran, that Soviet agents are helping to frment the street fights and that the United States must rush anti-riot armaments to the shah.

Certainly there have been enough Kremlin-directed conspiracies and takeovers in our time to lend some credence to this claim. But it is also true that the rationale of "no other alternative" has been so often misused as a cover for diplomatic bankruptcy that it should always be scrutinized - and especially so in the case of Iran.

Brzezinski notwithstanding, we can report that U.S. intelligence does not confirm any significant communist role in the Iranian portest movement beyond routine radio propaganda. The dominant element in the uprising, the dominant element in the uprising, the right-wing Moslems, is more anti-communist than the shah.

Even the radical student component is marching to a different drummer than any on Red Square, which is as derided as Wall Street among today's radical students in Iran and elsewhere. U.S. intelligence describes the anti-shah National Front as an umbrella organization for about 30 diverse groups representing a spectrum that is wide but leans to the right, with minimal Soviet influence.

In this respect, it resembles the anti-Somoza revolution in Nicaragua where conservative business elements have taken a leading role and where, even among the Sandinista guerrillas, communist sympathy is rare. We have the observations of our own reporter, Bob Sherman, who has traveled with the guerrillas in Nicargua, sharing hardship and danger with them.

We do not minimize the Iranian crisis. Perhaps the bankruptcy of our Iranian policy is so complete, the hostility of the Iranian populace toward the United States so great, that we have no present alternative but to cling to the shah. If so, it should be recognized as a confession of error, a proof of failure, not a demonstration of vigilance or steadfastness.

The State Department has behaved, meanwhile, as if the shah and Somoza would be permanent fixtures. No serious effort has been made to establish contacts and friendships in the opposition camps. A State Department official started to dispute this. "As a general rule," he told us, "our embassies keep in touch with all shades of the political spectrum." But under questioning, he acknowledged that the dialogue is confined largely to "social contacts that are above board."

The American adoration of the shah has gone beyond the bounds of reasonable policy. Under Democratic and Republican rule alike, the White House has pampered the shah, the Pentagon has attended to his wants and the State Department has been devoted to him.

All this has antagonized neighboring Saudi Arabia, whose oil has become essential to the well-being of all Americans. Yet Washington invariably has favored the shah over the more indispensable, more reliable Saudis.

It may be that a successor regime to the shah, faced with the menace of Russia looming on its border, will of necessity seek a continued alliance with the United States. If so, it will first have to overcome a national revulsion toward our complicitous past in Iran and a justified skepticism of our fitness to lead.