Reputation: 564
I am facing an issue in UPS Rating API integration. My request body is:
{
"RateRequest": {
"shipper": {
"address": {
"postal_code": "12345",
"country_code": "US"
}
},
"shipTo": {
"address": {
"postal_code": "54321",
"country_code": "US"
}
},
"shipment": {
"package": {
"dimensions": {
"unit_of_measurement": "IN",
"length": "10",
"width": "6",
"height": "4"
},
"weight": {
"unit_of_measurement": "LBS",
"weight": "1"
}
}
}
}
}
URL - https://wwwcie.ups.com/api/rating/v1/Rate?additionalinfo=string
Even though I'm passing an access-token in header it always returns:
{
"response": {
"errors": [
{
"code": "250002",
"message": "Invalid Authentication Information."
}
]
}
}
Upvotes: 9
Views: 7264
Reputation: 11
It's about Permission! If you already have the permission but still not working (like me), just remove the permission and add it again : login to your developer account/ Go to your Apps/ Select your App/ Edit APP/ Remove the Product/ Refresh or go back to your Apps..=> Add your product again
Upvotes: 1
Reputation: 61
You need to add Rating product in your created app. You can then see Rating in added product list.
Upvotes: 1
Reputation: 21
For anyone else getting this API error code and unresolved by correcting/verifying permissions issues, note that header values are case-sensitive: a lowercase bearer <token>
will produce error 250002 from UPS, whereas Bearer <token>
should succeed if all else is good to go.
Upvotes: 2
Reputation: 431
You need to add API permissions in the 'App/Edit App Add Products' section.
Upvotes: 2
Reputation: 564
I found the answer. I didn't add Rating API permission to my app. That was the issue. After adding, it's working fine.
To add the Rating API, login to your developer account and go to your Apps page at
https://developer.ups.com/apps?loc=en_US
Then edit your app and add the Rating API.
Upvotes: 30