Hey @jm.zhang
If you haven’t used one of your social accounts at Google, Facebook, Twitter, or LinkedIn to login to the portal.
To obtain a Two-factor authentication token using POST api/2.0/authentication/{code}, you only need:
- code from Google Authenticator (code)
- User name or email (userName)
- Password (password)
To obtain it using curl, use the following command:
curl --request POST --header “Content-Type: application/json” --data “{"username":"your@mail.com","password":"yourPassword"}” “portalNameOrIP/api/2.0/authentication/code.json”
“provider”, “accessToken”, and “codeOAuth” are used for authorization through social accounts.
If that’s not what you meant, please let me know.