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

How to send messages via API #8

Open
BenProg-A opened this issue Jul 30, 2020 · 8 comments
Open

How to send messages via API #8

BenProg-A opened this issue Jul 30, 2020 · 8 comments

Comments

@BenProg-A
Copy link

BenProg-A commented Jul 30, 2020

Hi @tejado & @felixb,

I am actually struggling with making an API call to send a message. Unfortunately this case isn't included in your examples.
The same like the problem with posting / creating an ad I have faced firstly with unmarshalled content and now with the 500 Internal Server Error. I am using the xml structure which is stated in the prototype but with the missing error code it is nearly impossible to know which field is missing.
I am assuming that /replies/reply-to-ad is the write URL but could you verify this? Maybe adding this to the example.py would also help others :-)

@tejado
Copy link
Owner

tejado commented Jul 30, 2020

Hi Ben,

so you have an issue with creating an ad (server error 500) and also with sending a message in the context of an existing ad?
Try to get the prototype for posting a message and use it to send the message, like it is described here: https://web.archive.org/web/20160320160821/https://api.ebay-kleinanzeigen.de/docs/pages/replies

What is the payload you are using to create an ad and what is the exact response?

Sadly, the documentation is only available over archive.og ... maybe someone can crawl it and push it to this repo :D

@BenProg-A
Copy link
Author

BenProg-A commented Jul 30, 2020

Hi tejado,

thank you for your really fast reply. I have wrote it a bit complicated. Creating an ad just worked perfectly but when I try to send a message it always produce a 500 server error. At the beginning I had the same problem like in this issue: #3
So now I am assuming that there are some fields renamed or missing with the api. Since back in the issue 3 a missing email tag also produced the 500 error.
I am using this payload:

<reply:reply-to-ad xmlns:types="http://www.ebayclassifiedsgroup.com/schema/types/v1"
xmlns:cat="http://www.ebayclassifiedsgroup.com/schema/category/v1"
xmlns:loc="http://www.ebayclassifiedsgroup.com/schema/location/v1"
xmlns:ad="http://www.ebayclassifiedsgroup.com/schema/ad/v1"
xmlns:feat="http://www.ebayclassifiedsgroup.com/schema/feature/v1"
xmlns:attr="http://www.ebayclassifiedsgroup.com/schema/attribute/v1"
xmlns:pic="http://www.ebayclassifiedsgroup.com/schema/picture/v1"
xmlns:document="http://www.ebayclassifiedsgroup.com/schema/document/v1"
xmlns:displayoption="http://www.ebayclassifiedsgroup.com/schema/displayoption/v1"
xmlns:tracking="http://www.ebayclassifiedsgroup.com/schema/tracking/v1"
xmlns:dfp="http://www.ebayclassifiedsgroup.com/schema/dfp/v1"
xmlns:media="http://www.ebayclassifiedsgroup.com/schema/media/v1"
xmlns:reply="http://www.ebayclassifiedsgroup.com/schema/reply/v1"
xmlns:counter="http://www.ebayclassifiedsgroup.com/schema/counter/v1"
xmlns:sug="http://www.ebayclassifiedsgroup.com/schema/suggestion/v1"
xmlns:flag="http://www.ebayclassifiedsgroup.com/schema/flag/v1"
xmlns:stat="http://www.ebayclassifiedsgroup.com/schema/stat/v1"
version="1.16"
locale="de_DE">
reply:ad-id123</reply:ad-id>
reply:usernamesampleUsername</reply:username>
reply:reply-from-email[email protected]</reply:reply-from-email>
reply:reply-messagesampleMessage</reply:reply-message>
reply:phone123456</reply:phone>
</reply:reply-to-ad>

When accessing the metadata of this schema it is stated that username and phone is optional. So these one shouldn't make any problems. I am a bit irritated of the reply-from-email tag because this one isn't need on the web or app site.
I have already crawled nearly everything.By time I can push it :-)
Another point is that /replies/reply-to-ad-conversation actually just completely don't work. I think for this one I have to research that also within the app.

@BenProg-A
Copy link
Author

Hi tejado,
I have found the problem. The docs are just outdated just have a completely other URL and it is also not send as xml but json instead. I will push this in the near future to the repo and thank you for your ideas posted in the other issues. Without your approach I would still be stuck on this one.

@tejado
Copy link
Owner

tejado commented Jul 31, 2020

Great! Im looking forward to your insights.

@GerritdinaH
Copy link

GerritdinaH commented Aug 11, 2020

Hi tejado,
I have found the problem. The docs are just outdated just have a completely other URL and it is also not send as xml but json instead. I will push this in the near future to the repo and thank you for your ideas posted in the other issues. Without your approach I would still be stuck on this one.

when will you push it to the Repo? would be interested in that too!

EDIT: nvm figured it out!

@MarkObie
Copy link

MarkObie commented Feb 9, 2021

@GerritdinaH @BenProg-A Can you please share how you did it?
Thanks!!

@tejado
Copy link
Owner

tejado commented Feb 9, 2021

Please have a look into PR #9 sorry, not yet merged...

@porkich99
Copy link

Hi @GerritdinaH, I just tried your implementation of convos, but I suppose they've changed again sth:

api.get_my_convos() raises Access Denied 401 + the well-known error "Unknown user and/or incorrect password Authentication failure, check challenge header X-ECG-Authenticate-User"

Have you experienced the same issue?

Thx!

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

5 participants