Has anyone ever been able to insert deep linking? Trying to add DM buttons for slack app onto my site but wix doesn’t seem to accept urls that dont start with https.
the link im trying to use is slack://user?team={TEAM_ID}&id={USER_ID}
where I fill in team_id and user_id
1 Like
I don’t understand the question
You want people to be able to DM on your website but you want to use slack as the medium?
I just want to link a button on wix to a link that looks like this: slack://user?team=1234&id=12345
the problem is…while that link works when i enter it in chrome, wix doesn’t recognize it as a functioning link because it doesn’t start with https or / so i click on the button and nothing happens
I was wondering about deep links too. I want to add a link to a button on my website that opens an app when clicked on mobile devices. The link looks like this:
paofit://events/join?id=2310&code=c14ffd930b62d35
It opens to a specific “event” I created with the RunSocialGPS app so other people can join my event.
I am a completer newbie to code. I contacted Wix support but was not able to figure this out. What is the best way to accomplish this?
Since it is not supported by to and that we don’t have access to window.location.replace , I solved it by creating an http function to handle the redirection.
On the client:
import { baseUrl, to } from "wix-location";
function redirect(uri) {
to(`${baseUrl}/_functions/redirect?redirect_uri=${uri}`);
}
Then call:
redirect("deeplink://home");
On the server:
import { ok, serverError, response } from 'wix-http-functions';
const payload = {
headers: {
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json"
},
body: {},
};
export async function get_redirect(request) {
try {
const { redirect_uri } = request.query;
payload.status = 301;
payload.headers.Location = redirect_uri;
return response(payload);
} catch (e) {
payload.body.error = e.toString();
return serverError(payload);
}
}
Note: this code snippet does not handle query parameters. You will have to manually handle them from request.query or encode your redirect_uri.