So that is the error you want as it means you are hitting the endpoint, just not providing a valid token.
Couple things:
- Make sure you generate the token from the same okta tenant you are hitting the endpoint
- The user who generated your token has sufficient permissions as tokens will inherit permissions from the creator
- You are passing the token in
Authorization
header asSSWS API_TOKEN_HERE
(looks right from your sample curl) - The token is not expired as tokens need to be used at least once every 30 days, otherwise they will expire