Error trying to use translation in Python V2.

dmoura329dmoura329 Member
edited October 2 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 = ''

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

url = '' + 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()

Sign In or Register to comment.