vcenter server 6.5 version (windows 2008 R2)
call vcenter REST API in google chrome,
https://192.168.0.219/rest/vcenter/datacenter
result:
{"type":"com.vmware.vapi.std.errors.unauthenticated","value":{"messages":[{"args":[],"default_message":"This method requires authentication.","id":"vapi.method.authentication.required"}]}}
You need to be addressing the REST API with a FQDN for vCenter and not IP.
After trying, the progress is as follows:
call vcenter REST API in google chrome,
https://dr4c1jco728bur5.nj.vcenter.com/rest/vcenter/datacenter
result:
{"type":"com.vmware.vapi.std.errors.unauthenticated","value":{"messages":[{"args":[],"default_message":"This method requires authentication.","id":"vapi.method.authentication.required"}]}}
Did you get a token? The response suggests you did not.
I can login "https://dr4c1jco728bur5.nj.vcenter.com/"
user:administrator@vsphere.local pass: XXXXXXXX
Does this have anything to do with token?
No, please go back and read the documentation.