Dear API forum users,

We are in the process of changing the login system of the forum.

Your account will be preserved, but you will be prompted to reset your password at some point in the next few days.

Just go to Sign in on https://forum.oxforddictionaries.com/api/ and follow the instructions to reset your password.

If you have any questions, please get in touch with us on [email protected]

Error trying to use translation in Python V2.

dmoura329dmoura329 Member
edited October 2019 in Review my code

I'm doing a monograph on this great API, but I can't use version 2 for "Python" translations.
Note: I am new to the art of programming.

The system displays error 403

I've read it many times and couldn't understand what I did wrong.
Could someone guide me?

************* My code*********Could someone help me please?
import requests
import json

app_id = 'xxxxxxx'
app_key = 'xxxxxxxxxx'
api_base_urll = 'https://od-api.oxforddictionaries.com/api/v2/translations/'

word_id = 'ace'
source_lang_translate = 'en'
target_lang_translate = 'pt'
strictMatch = 'false'

url = 'https://od-api.oxforddictionaries.com/api/v2/translations/' + source_lang_translate + '/' + target_lang_translate + '/' + word_id + '?strictMatch=' + strictMatch

r = requests.get(url, headers={'accept': 'application/json', 'app_id': app_id, 'app_key': app_key})

data = r.json()

Comments

  • TaisFukushimaTaisFukushima Member, Administrator, Moderator admin
    edited October 2019

    Hello @dmoura329

    I have forwarded this issue to my colleagues from the technical team. They tried to do the same request and it is working fine for them.

    The translation endpoint is only available for the Developer plan. If you hold a Prototype plan, you won't be able to retrieve translations since this plan only allows requests to Entries and Lemmas endpoints.

    We hope this helps. Please let us know if you are on a Developer plan and still facing this issue.

Sign In or Register to comment.