Getting 403 forbidden error, even though I am giving the right crendentials

please tell me how to send a request if below code is wrong

var settings = {
url: getBaseURL() + /search/en?q=${searchWord}&prefix=true,
method: "GET",
headers: {
app_id: process.env.REACT_APP_OD_APP_ID,
app_key: process.env.REACT_APP_OD_API_KEY
}
};
$.ajax(settings).done(function(response) {
console.log(response);
});

Answers

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited January 3

    Hi @hnakkina439,

    I'm not particularly familiar with the account side of things but can you please confirm that you are using the correct app_id and app_key?

    They should have been emailed to you when you signed up for an account and look similar to the ones you see on our documentation page (which don't work on the liver version of the API):
    "app_id": "5037d509",
    "app_key": "4dc1aebaa63721f0f8e79a55e2514bc7"

  • shahoodshahood Member
    @hnakkina439 hi, what's this /en in ur URL? Pl recheck it.
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    That's the language abbreviation ("en" = English). It's perfectly correct (for an English lookup, of course!).

Sign In or Register to comment.