Closed Pigsnuck closed 8 years ago
Hi Craig,
have you first started the example with the argument "-a" to create the access token and access token secret? These also have to be entered into the config file for the sample to work.
The AggregateException just says that a asynchronous task that was awaited had a problem. The information in the exception should help out to see why but I assume that the response was not being parsed since the authentication failed due to the missing access information.
Benny
Thanks for your quick response. Yes, I did first run the console project with a -a parameter to get the access token and access secret, but this is the part that threw the error.
Upon further debugging, I found that switching the BaseUrlPrefix from http://rest.sandbox-immobilienscout24.de/restapi/security to http://rest.immobilienscout24.de/restapi/security caused this part to work. I then updated my config.json file with the new information.
Then I ran the console app without the -a parameter and received the same error, so I also changed this BaseUrlPrefix to http://rest.immobilienscout24.de/restapi/api, but this time it doesn't work. I now receive the following error in the XML response of IS24Connection.ExecuteAsync
{"ERROR_COMMON_RESOURCE_NOT_FOUND: Resource was not found."}
I am sure I am doing something wrong, but what?
If you just want to try out things, make sure to request a sandbox account from IS24. They don't let you use the production credentials on the sandbox. It's always better than playing around on the production API.
On what call was the exception thrown? Directly at the first call to the search API or on any of the ImportExport calls?
Yes, the error was thrown on the first call to the search API. Does this mean my account is authenticated but not authorized?
My use-case is very simple - I just want to call the search feature with specific parameters. Do you think I need to use the sandbox in this case?
I can repro this (sandbox). 404 occurs for about 4 in 5 search requests, once in a while I get an OK response, though. I'm pretty certain this has nothing to do with authentication, you'd get a 401 Unauthorized in that case. I'll post in the Google group.
Aha! Thanks mganss. I thought I was just being stupid!
Will you post here if there is a solution, or shall I check the Google Group? What is the URL, by the way?
I'll update this issue when there's feedback from the group. The URL is https://groups.google.com/d/forum/immobilienscout24-development It's mostly in German, though. Here's the link to the topic with this issue: https://groups.google.com/d/msg/immobilienscout24-development/7ws9nCXMN_o/Nps6SErTK9kJ
Can no longer repro the issue. Seems to have been a temporary server side problem.
Hi,
I downloaded the sample project, but I can't run it in VS 2013. I updated to the .NET 4.5.2 SDK, and reconnected all the missing NuGet packages (RestSharp, etc) and put my ConsumerKey and ConsumerSecret in config.json, but I get the following error:
An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll
Can someone please point me in the right direction?
Craig