Forum Discussion
kevinds89
6 years agoNew Contributor
This has been very frustrating for me and I'm now writing this 3 years after your post. Anyways I've gotten around it a little by using some code in the automation section. Hopefully this helps any other poor souls. I grab the auth code from my redirect URI, then I post it manually and use a page that simply displays my URL to me. This way I can copy and paste into SOAP UI. Not a great workflow but stops me from having to open PostMan or something else.
if(document.URL.startsWith("<redirect URI>")) { var code = document.URL.split('?')[1].split('=')[1]; var URL = "<Token URL> "; var xhr = new XMLHttpRequest(); xhr.open('POST', URL, false); var body = "&grant_type=authorization_code&code=" + code + "&redirect_uri=<redirect URI>&client_id=${#Project#ClientId}"; xhr.setRequestHeader('Content-Type',"application/x-www-form-urlencoded"); xhr.send(body); var theResponse = JSON.parse(xhr.response); var token = theResponse.access_token; this.location = "<reflection page URL>?access_token=" + token; }
Related Content
Recent Discussions
- 5 days ago