How do I get params from the URL on a webapp with Vue?

Basically a user will get an email such as /verify/sometokenhere, and I’d like to get the param in the route-
My router is defined as
path: '/'verify/:token?,
component: VerifyPage,

And I try to get the params in this way:
but for some reason I get undefined.
The params object does detect the token propery, but it’s undefined no matter what I send, and the user is getting there without any routing api, it’s directly from the URL bar.
How can I achieve this behavior? It’s an optional parameter.

Have you tried it without the ?. Looks like it’s not necessary in your case.

Did you find the solution,

I ended up using a query parameter, since it was an optional parameter and it didn’t really mess up with the logic, something like