Symptom
Receiving the following when trying to login to REST API at https://restapi.ultradns.com/:
{
"errorCode": 60005,
"errorMessage": "grant_type not supported",
"error": "unsupported_grant_type",
"error_description": "60005: grant_type not supported"
}Root Cause
Username and Password were not supplied via body with x-www-form-urlencoded
Steps to Resolution
-
Login to REST API in one of the following ways
-
Option 1
- Postman
- Select POST as method
- Enter https://restapi.ultradns.com/v2/authorization/token as URL
-
For Body use:
- Click radio button for x-www-form-urlencoded
-
Add the following
- grant_type password
- username {insert your username}
- password {insert your password}Click Send
-
Option 2
- CURL
-
Option 1
curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: [Removed]" -H "Content-Type: application/x-www-form-urlencoded" -d 'grant_type=password&username=[Removed]&password=[Removed]' "https://restapi.ultradns.com/v2/authorization/token"