| | |

| | ONEOK, Inc. November 18, 2022 Page 2 |
| (e) | the Company’s Amended and Restated By-laws. |
We have also examined originals or copies of such records of the Company and such agreements, certificates of public officials, certificates of officers or other representatives of the Company and others, and such other documents, certificates and records, as we have deemed necessary or appropriate as a basis for the opinions set forth herein. In our examination, we have assumed the legal capacity of all natural persons, the genuineness of all signatures, the authenticity of all documents submitted to us as originals, and the conformity to authentic original documents of all documents submitted to us as certified electronic, photostatic or reproduction copies. As to any facts material to the opinions and statements expressed herein that we did not independently establish or verify, we have relied, to the extent we deem appropriate, upon (i) oral or written statements and representations of officers and other representatives of the Company and (ii) statements and certifications of public officials and others.
Based upon the foregoing and subject to the limitations, qualifications, exceptions and assumptions set forth herein, we are of the opinion that:
1. The Company has the corporate power and authority to execute and deliver the Notes and perform its obligations thereunder.
2. The Notes have been duly authorized by the Company.
Our opinions expressed herein are subject to the following qualifications:
(i) Our opinions are limited to the laws of the State of Oklahoma, and we do not express any opinion as to the laws of any other jurisdiction, including without limitation the federal laws of the United States.
(ii) The opinions herein are limited to the matters expressly set forth in this letter, and no opinions are implied or may be inferred beyond the matters expressly so stated.
(iii) The opinions expressed herein are as of the date hereof only and are based on laws, orders, contract terms and provisions, and facts as of such date, and we disclaim any obligation to update this opinion letter after such date or to advise you of changes of facts stated or assumed herein or any subsequent changes in law.