Welcome to the forum.
You should revoke your API key and issue a new one, posting it on a forum means you can no longer consider it safe to use.
As to the substance of your question, you apparently want to use the REST api from Python. There is a Python client library available as well. Which error code are you getting?