So I got this working. Basically found a python version of the token exchange service which worked. Somehow the ruby version just didn't work even when modified for remote hosting.
Here is the link for anyone else in the future. https://github.com/plamere/spotify_token_swap/blob/master/spotify_token_swap.py