No se si te entendí, pero creo que se parece a esto:
data= ("targetPhone=" + nrodestino
"message=" +_mensaje
"token=XXX-XXX-XXX-XXXXX")
f = open('mensaje.html','w')
mensaje = """<html> <head></head> <body><p>{data}</p></body> </html>"""
f.write(mensaje)
f.close()
#Cambia la ruta para indicar la localización del archivo
archivo = 'file:///Users/username/Desktop/micarpeta/' + 'mensaje.html'
webbrowser.open_new_tab(archivo)