Surpringly to access MTN API's there's a complex way to generate Bearer Tokens to authenticate your HTTP Requests. This is how you can get the Bearer Tokens and other credentials.
Make sure to add the primary or secondary key from Momo Developers Dashboard in the main.cpp file.
Give permissions to the run.sh bash file and execute it.
sudo chmod -R a+rwx run.sh
Run file by ./run.sh or bash run.sh
In related contexts, feel free to raise and issue we can discuss about.