I sometimes get this error when trying to export a feature service via the REST api. The token is valid, I can make other calls with it and those work fine. The user for the token is the admin for the entire Org, so I don't know why a particular feature service could not be exported. finally, it works perfectly fine when logging in via the web UI and exporting with the context menu
fwiw, the issue was using the portal name instead of the portal urlKey in the Url used to call the service. I had thought they were interchangeable but it appears the urlKey is the preferred method