No pipe lines shall be constructed across or along any public highway without the consent of the public officer or body having supervision thereof, upon such terms as may be agreed upon with him or it, and also in the case of any public highway in any city or village except as provided in section eighty-seven of this chapter, provided that if the highway be one under the sole supervision of a city or village or some official thereof then the authorization of the municipal authorities as required by section eighty-seven shall be sufficient without any other consent made necessary by this section. If such consent, except one required under section eighty-seven, or the consent of the municipal authorities required by the preceding section cannot be obtained, application may be made to the supreme court in the judicial district in which such highway or bridge is situated for an order permitting the corporation to construct its line across or along such highway, or upon such bridge. The application shall be by duly verified petition and notice which shall be served upon the public officer or body having supervision of the highway, or the municipal authorities of the village or city where such bridge is located in a case of consent required by the preceding section, and the court upon the hearing of the application may grant an order permitting the line to be constructed in such manner and upon such terms as it may direct.
N.Y. Transp. Corp. Law § 86