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.