Jovo & VueJS Web Client & Redirection URL return data


#1

Hello

We have Jovo app and VueJS web client with the redirection to auth2.
This link returns some informations and we would like to known if it’s possible to get this information in jovo app.

Best regards

Romain


#2

You can add data to the request, for example you could add it as session data and then read that data in the Jovo app.

This is the structure of a Jovo Core (and Web) platform request: https://www.jovo.tech/marketplace/platform-core#requests


#3

Hi @jan
In the jovo app we have this function
openDocumentation() { this.$send({ message: 'Great! Opening now...', listen: true, platforms: { web: { // custom property used for this example redirectTo: 'http:localhost:2000', }, }, }); console.log(this); console.log(this.$session.data); console.log(this.jovo.$session.data); return this.$send('end'); }

In the web client we have this function

`  private onOutput(output: NormalizedOutputTemplate) {
// custom property just used for this example to redirect to a given website
const redirectTo = output.platforms?.web?.redirectTo;
if (typeof redirectTo === 'string' && redirectTo) {
  setTimeout(() => {
    window.open(redirectTo, '_blank');
  }, 800);
}

}`

When this url is open http:localhost:2000, it’s return lots of informations {name:“Carl”} and I would like to get this information in jovo app.
I don’t know if it’s possible, for example with this this.$data.name or this this.$client.store.sessionData.name:

`  private onOutput(output: NormalizedOutputTemplate) {
// custom property just used for this example to redirect to a given website
const redirectTo = output.platforms?.web?.redirectTo;
if (typeof redirectTo === 'string' && redirectTo) {
  setTimeout(() => {
    window.open(redirectTo, '_blank');
  }, 800);
}

}`

Thanks