The 401 unauthorized leads me to believe that your .env file is not being loaded. If you want to use a .env file, you need to use the dotenv gem or run the application with Foreman.
/v1/marketplaces/TEST-MP1vtjZnkpRR6DmfeAvyRwm3
is your marketplace URI. https://dashboard.balancedpayments.com/#/marketplaces/TEST-MP1Bb6nnn1xWxAYk05VwDzia
is for viewing your marketplace Dashboard, which is not the same thing.
In case the values you mentioned for BALANCED_SECRET and BALANCED_CSRF are real, even though they are for a test environment, I recommend you change them immediately.
If you need any additional help, feel free to drop by #balanced on Freenode IRC for direct assistance from Balanced developers.