I searched for Envato errors like this and found some documentation:
Checking under this section for your specific error:
API Error on template import: Sorry there was an unexpected error from API call…
One of the things they mention is that this has to be done on a live, hosted site. It doesn’t sound like from their description this will work in a local dev environment.
This jogged my memory as I think we’ve had users try to get this going locally in the past but it just doesn’t work that way: