After which treaty was signed, western powers were granted the right to send envoys to Beijing?

Tianjin Treaty 1858. The Qing government successively signed with Russia (1June 3), the United States (1June 8), Britain (June 26) and France (June 27).

The Tianjin Treaty stipulates that:

Foreign Minister accredited to Beijing;

Open ten trading ports including Niuzhuang (later changed to Yingkou), Dengzhou (later changed to Yantai), Tainan, Danshui, Chaozhou (later changed to Shantou), Qiongzhou, Nanjing, Jiujiang, Zhenjiang and Hankou; Foreigners can enter the mainland for tourism and trade; Foreign warships and merchant ships have the right to sail into the Yangtze River and various trading ports; Amend the tariff and reduce the tonnage tax of merchant ships; Compensation for Britain's four million and two thousand, compensation for France's two million and two thousand; And legalize the opium trade in the affiliated areas.