diff --git a/obp-api/src/main/scala/code/snippet/VrpConsentCreation.scala b/obp-api/src/main/scala/code/snippet/VrpConsentCreation.scala index 2e273d10cd..b11c03b95d 100644 --- a/obp-api/src/main/scala/code/snippet/VrpConsentCreation.scala +++ b/obp-api/src/main/scala/code/snippet/VrpConsentCreation.scala @@ -193,8 +193,8 @@ class VrpConsentCreation extends MdcLoggable with RestHelper with APIMethods510 tryo {json.parse(response).extract[ConsumerJsonV310]} match { case Full(consumerJsonV310) => //4th: get the redirect url. - val redirectURL = consumerJsonV310.redirect_url - S.redirectTo(redirectURL) + val redirectURL = consumerJsonV310.redirect_url.trim + S.redirectTo(s"$redirectURL?CONSENT_REQUEST_ID=${consentJsonV510.consent_request_id.getOrElse("")}") case _ => S.error(s"$InvalidJsonFormat The Json body should be the $ConsumerJsonV310. " + s"Please check `Get Consumer` !")