Getting the AppID and AppKey?
Categories
- 326 All Categories
- 3 Language datasets
- 9 News and updates
- 18 API endpoints
- 15 Review my code
- 6 Tutorials and presentations
- 92 Frequently asked questions
- 5 How to get useful technical help
- 2 Member guidelines
- 12 Suggest an improvement
- 58 Report a bug
- 10 Ask the Community: Other
- 56 Ask the Community: Technical and operational questions
- 62 General
Getting the AppID and AppKey?
The very first step, getting your profile credentials, isn't as clear as it should be. The given example:
app_id = "<my_app_id>" app_key = "<my_app_key>"
Has no counterpart in the credentials page. There's App Name, and Credentials. Supplying either for the two variables causes authentication to fail with code 403. To demonstrate, I've changed the app_id to different numbers and letters:
import json import requests app_id = "11100aaa" app_key = "N/A's App" endpoint = "entries" language_code = "en-gb" word_id = "sing" url = "https://od-api.oxforddictionaries.com/api/v2/" + endpoint + "/" + language_code + "/" + word_id.lower() r = requests.get(url, headers = {"app_id": app_id, "app_key": app_key}) print("code {}\n".format(r.status_code)) print("text \n" + r.text) print("json \n" + json.dumps(r.json()))
So what am I doing wrong here? This is step one, and it doesn't work.
Comments
Hello @FiftyTifty
Could I please confirm that you have an API account with us? I couldn't find your credentials to check if there is something wrong.
When you create an API account, you will have an API ID and Key. These API credentials should be in your account homepage under the Credentials button.
Could you please use your credentials in and ?
It seems that the information added in the app_key (app_key = "N/A's App") isn't the usual key created by our system, but the name of the application. It can explain the error message you're receiving.
Please. let me know if it worked.