Muhammad Ali, bruised from his encounter in neighboring Tanzania, came back strong in the second round of his Olympic boycott campaign in black Africa today with a warm reception here and a declaration that he supports President Carter "100 percent."

Ali, looking suave, if subdued, in a white suit in the rose garden of the presidential residence, was photographed with Kenya President Daniel arap Moi and all the luminaries of the Kenyan political establishment after a half-hour chat with Moi.

His presence here caused traffic jams, and office workers greeted him with kisses and hugs in downtown Nairobi.

His reception here was in striking contrast to the cool treatment he was given in Tanzania, where President Julius Nyerere was too busy to see him and the press bombarded him with hostile questions about U.S. policies on Africa.

Kenya was the ideal place for the former world heavyweight boxing champion to get his breath back after the rough bout in Tanzania, where it looked as though he had lost faith in his mission to gain support for Carter's campaign to boycott the Moscow Olympics unless the Soviets withdraw their troops from Afghanistan.

Kenyan President Moi, among America's staunchest allies in black Africa, has already told Kenyan athletes not to go to Moscow.

"I support President Carter 100 percent and now I feel better about this whole trip," Ali said today as he emerged from a meeting with Kenyan Sports Minister Robert Matano.

"The problem is I had not been properly briefed about these questions . . . Now I feel better," said Ali, referring to his confusion and unhappiness in Tanzania when journalists demanded that he defend U.S. trade and sports links with South Africa and the U.S. refusal to join a black African boycott of the 1976 Montreal Olympics to protest South African ties.

When he arrived here yesterday, Ali's mood was decidedly down and he grumbled that Carter had sent him to Africa to be "America's whipping boy."

Today, however, he was his usual confident self.

"We have straightened the whole thing out," he said. "President Carter did not put me on the spot."

Rather, he said, the "people who came from Washington" to handle his mission did not brief him fully on U.S. policy toward South Africa and this "got me in a position where I had to defend myself."

Official Washington closed ranks behind Ali, publicly defending his performance. Secretary of State, Cyrus R. Vance, appearing before the House Foreign Affairs Committee, said of Ali, "I think he has been an effective and eloquent spokesman . . . I think he should continue to speak his piece."

White House press secretary Jody Powell said Ali has been "doing a good job" and "having a positive impact" despite receiving "a pretty tough going over from at least some of the folks there whose ideological sympathies are well known." He said he meant that some of the hostile questions came from journalists sympathetic to the Soviet Union.

[Meanwhile Randall Robinson, executive director of TransAfrica, a national coalition of U.S. black leaders, called Carter's assignment of Ali as an envoy to black Africa "racist by implication" and said Ali "has quite properly turned a wholly ill-conceived mission into a fact-finding trip that may prove to be beneficial to Africa and enlightening to the United States.]

"He's an unguided missile -- there's no recovery -- but now he's back on course," said one deeply relieved American official as Ali, in dark blue sports clothes, signed hundreds of autographs at a huge evening reception given at U.S. Ambassador Wilbert Le Melle's luxurious suburban home.

"He's not trying to make out he represents President Carter's views. He's here because of a coincidence of powerfully held views on the invasion of Afghanistan, that's all. It's not a matter of a trained performer forgetting his lines," the official added.

Another U.S. official moved across the lawn to say, "What's being obscured in all the commotion caused by the 'Uncle Tom' jibes in Tanzania is the fantastic gall of the Russians sending their ambassador to try to talk him out of the trip when he was in India."

Another U.S. official came up to say that the Nigerian press had come out with editorials headlined "Forward to Moscow." Nigeria, Liberia and Senegal are the countries remaining on Ali's itinerary.

Meanwhile Ali was enjoying his usual social success. For a mile outside the ambassador's residence cars were parked all over the roadside grass, carrying people eager to shake the large calloused hand of the world's best-known boxer.

The most relaxed point of his visit was a meeting with a small crowd of fellow Moslems in the American cultural center.

"I'm not the greatest. The greatest is Allah," he said. "I'm learning and I want to learn more and more as I go along."