cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

403 Error, Forbidden

$.ajax({
type: 'PATCH',
url: 'https://api.godaddy.com/v1/domains/mydomain/records',
headers: {
'Authorization': 'sso-key mykey:mysecret',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
data: [{
'type': 'A',
'name': 'mysubdomain',
'data': '**.**.***.**',
'ttl': '3600'
}],
success: function (body) {
console.log(body);
},
error: function (err) {
alert('There is some error' + err);

}
});

I am using this script to make an ajax call to godaddy APIs for adding A record to my existing domain. I am using same content with Postman but getting 403 Error via both calls. I got reply from support email that APIs are working fine, but why not you people suggest what I am doing wrong,

What I have to add in my call in Ajax or in Postman which is causing 403 Error.

2 REPLIES 2
Resolver I

Re: 403 Error, Forbidden

Take a look at this stackoverflow site, may help you get some ideas.

https://stackoverflow.com/questions/38614906/adding-an-a-record-with-godaddy-api

Re: 403 Error, Forbidden

In your given URL of stackoverflow its only addition of 'domain' with data. which don't make sense of 403 Error.

Someone can please guide what can be the reason for 403 error. if all the required keys are there.