Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 6
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2645 times and has 5 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
API Help, User Not Found

Trying to set up a data query of results, but cant get even past the name verification part where help at h ttps://www.worldcommunitygrid.org/help/viewSearch.do?searchString=api says

h ttps://www.worldcommunitygrid.org/api/members/{member name}/results?code={verification code}

When substituting with

h ttps://www.worldcommunitygrid.org/verifyMember.do?name=lavaflow&code=abcdec3f25c674fde5df93b457a6c447

Get

<Error>Username Not Found</Error>

And attempted import produces the same message

<?xml version="1.0" encoding="UTF-8" ?>
- <error>
<error_code>404</error_code>
<error_message>User not found</error_message>
</error>

What's wrong with this?

Thanks in advance.

edit, space in http intentional as else the code wont show correctly in post
----------------------------------------
[Edit 2 times, last edit by Former Member at Mar 26, 2019 12:22:46 PM]
[Mar 26, 2019 12:20:47 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Sgt.Joe
Ace Cruncher
USA
Joined: Jul 4, 2006
Post Count: 7847
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: API Help, User Not Found

I do note in the API section the instructions use "http" rather than "https". Although using Firefox it automatically adds the "s".
I tried mine and it returned information without a problem. I actually used yours as a template and merely substituted my name and verification code. Possibly an error in your verification code ?
Cheers
----------------------------------------
Sgt. Joe
*Minnesota Crunchers*
[Mar 26, 2019 1:50:59 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: API Help, User Not Found

Thx but no, the Help API uses explicitly https, and think to have read that WCG is enforcing secure connecting.

Meanwhile, experimenting, hiding your detail data from the public and 3rd party sites breaks the API operation. Also it seems the help is in error. The account code needs to be used, NOT the verification code. Then it works with both these changes.

Of course, I have an opinion about breaking the functionality when data is hidden.

Think I just pass and let the "no contribution" reminders for what they are.
[Mar 26, 2019 2:19:17 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: API Help, User Not Found

Hi Lavaflow,

I just started messing with this yesterday. I used the "Verification Code" on the profile view page:
 https ://www.worldcommunitygrid.org/ms/viewMyProfile.do

to retrieve my code and then sent a request to the API endpoint at:
https ://www.worldcommunitygrid.org/api/members/{member_name}/results?code={verification_code}

where "geekworldliving" is my member name and the long string from the Profile page is my verification code and I get work results back either in JSON or XML depending on what format I ask for, like this:
https ://www.worldcommunitygrid.org/api/members/geekworldliving/results?code=06bd8bedcecefc5a8a1d45b34e12bf23b&format=json

(I provided a mocked-up verification code here for posting in the forum. Also, I intentionally inserted a space between https and the colon : so it would display here in the forums)

I also tried the member stats API that you're referencing too. That one worked as well sending me back an XML document using this:
https ://www.worldcommunitygrid.org/verifyMember.do?name=geekworldliving&code=06bd8bedcecefc5a8a1d45b34e12bf23b

The fact that you're getting a 404 message along with "user not found" sounds like something is wrong with either the member name or verification code you're sending.

Best,

-mark
----------------------------------------
[Edit 1 times, last edit by Former Member at Mar 26, 2019 11:31:57 PM]
[Mar 26, 2019 10:06:58 PM]   Link   Report threatening or abusive post: please login first  Go to top 
twilyth
Master Cruncher
US
Joined: Mar 30, 2007
Post Count: 2130
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: API Help, User Not Found

This was probably a typo but "https" has an embedded space every time you reference it in your post, to wit "h ttps"

edit - just saw your addendum - never mind. :)
----------------------------------------


----------------------------------------
[Edit 1 times, last edit by twilyth at Mar 27, 2019 2:47:36 AM]
[Mar 27, 2019 2:46:31 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: API Help, User Not Found

For the readers: I've alternated between Display my data / Hide my data on the Data Sharing tab of Settings. As soon as the "Hide my data" is set, the 404 "Username not Found" error appears. Great, but not intending to show my data just to get the API to run.

The ball is in the developers court.
[Mar 27, 2019 9:02:07 AM]   Link   Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Post new Thread