Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to provide API Key #1

Open
taraspos opened this issue Aug 21, 2020 · 3 comments
Open

Way to provide API Key #1

taraspos opened this issue Aug 21, 2020 · 3 comments

Comments

@taraspos
Copy link

Hey, thanks for the MemoQ client.
I was trying it out, however, so far I have an error zeep.exceptions.Fault: WS API incoming call has been rejected due to missing API key. and I'm trying to understand how do I provide my ApiKey header.

I see something in the zeep examples, but do not understand how to use it yet: https://github.com/mvantellingen/python-zeep/blob/da8a88b9f5f36b7417328623b25bee0b872f7f3b/examples/trafficvance_apikey.py#L15

Thanks!

@taraspos
Copy link
Author

taraspos commented Aug 21, 2020

Probably I need to modify the client here

self.__client = CachingClient(wsdl=self.service_url)
to include the header_value with API Key in the following format: https://docs.memoq.com/current/api-docs/wsapi/memoqservices/security.html#api-key

@vasokot
Copy link

vasokot commented Jul 15, 2022

How i can use my login and password to Authentication at server?

@SteveBraich
Copy link

OK. I think I am getting close to being able to add the API key, but I need a little guidence:

I followed this example of adding a header to zeep.
https://stackoverflow.com/questions/64244938/how-to-build-a-soap-header-with-zeep

header = {'ApiKey': '[Your API Key goes here'} self.__client.service.Method(header=header)

I get the following error message:
AttributeError: Service has no operation 'Method'

I don't know what method name should be used in place of .Method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants