LONDON — Another reminder this week that schadenfreude is a pleasure best avoided by the political class:

Two of Britain’s most senior politicians, one Labour, one Conservative, both former foreign secretaries, have been caught in an embarrassing media sting. When the same fate befell three of Jack Straw’s colleagues before the last election, he chided them for their “stupidity in allowing themselves to be suckered in a sting like this.”

Guess what, Mr. Straw? You got suckered by the same old trick. Undercover reporters, posing as intermediaries for a phony Chinese business, tempted Straw, who was foreign secretary during the Iraq War, and Sir Malcolm Rifkind into claiming they would make extensive use their political influence in exchange for great wads of cash.

Nothing either man did was illegal, and their willingness to accept well-paid advisory roles may not even have breached House of Commons guidelines. Nonetheless, hidden camera footage of the former ministers grasping for money reinforces the view that politicians are more interested in looking out for themselves than the voters they are supposed to represent.

“I am kicking myself,” admitted Straw, after news of the footage to be shown on Channel 4’s Dispatches emerged on Sunday night.

Rifkind, who was foreign secretary in the dying days of the last Conservative government in the 1990s, tried to brazen it out, insisting that there was no reason for him to resign as chairman of the parliamentary intelligence and security committee. On Tuesday morning he strode defiantly to work in Westminster, telling the TV cameras to “mind your own business” before mocking a cameraman for the way he was walking and for forgetting the correct name of Rifkind’s committee.

Not long after Rifkind had marched into the office, he was skulking back out again to announce that, yes, he was going to resign after all. In the intervening minutes, Downing Street had let him know that the Conservative prime minister, David Cameron, was displeased. With an election less than three months away, this sort of slipup was not to be tolerated.

In one of the videos, Rifkind was seen boasting that he could call a meeting with any ambassador in London. “They’ll all see me personally,” he said. “That provides access in a way that is, is useful.”

He also told the undercover reporters from Channel 4 and The Telegraph that he would be willing to write to ministers on behalf of the fictitious Hong Kong-based communications agency without mentioning the name of the business. He said his fee would be between £5,000 and £8,000 for half a day’s work. “You’d be surprised how much free time I have,” he said, despite leading the committee entrusted with scrutinizing MI5, MI6, and GCHQ, Britain’s equivalent of the NSA, which has been caught up in many of the Snowden revelations.

Perhaps most embarrassingly, Rifkind claimed that he was “self-employed” because “nobody pays me a salary,” even though he is receives more than $125,000 a year as an MP who chairs a committee.

After the tape had emerged, he made matters worse by claiming he was entitled to a far larger income. “The reality is that anyone from a professional or business background earns considerably more,” he told the BBC. “I want to have the standard of living my professional background would normally entitle me to have.”

MPs are allowed to undertake paid work in the private sector as long as they declare it on a parliamentary register of outside interests. One hundred eighty MPs make money on the side, and a dozen of those earn more from their sideline than their parliamentary work. Last year, Rifkind declared more than $100,000 in additional earnings.

He announced on Tuesday that he would not stand for re-election in May.

Straw was already planning to retire from frontline politics this year, and he told the undercover reporters that he would only be able to help them once he had left Parliament. He did, however, claim that he had successfully lobbied on behalf of private clients in the past. He said he had been able to change European Union sugar regulations in order to help ED&F Man Holdings, a commodities company that pays him more than $90,000 a year. “I got in to see the relevant director general and his officials in Brussels,” Straw said. “It’s public that the regulations have been changed, but the best way of dealing with these things is under the radar.”

Straw, who became a confidant of Colin Powell during the buildup to the Iraq War, asked to be suspended from the Labour Party, but his retirement is likely to begin before any inquiry into his conduct can be held.

Both men maintain that they have done nothing wrong.