API Support

Facing any issues with the API? Share them here
406 views

Add a comment

Replies

Best
API Update: We've added support to fetch "makers" & "media" for each Post item. Check out cc
Awesome, is this also reflected in the API explorer?
yes, the API explorer has the new fields.
Awesome! Thanks man ;)
Is there a way to upvote using this API? I don't see a mutation for that? Also, what will be the validity for the access_grant_token & access_token?
Currently we don't allow upvotes via the API. The access_token is long lived(never expires) and access_grant_token expires in 20m.
API Update: We've added support to fetch "goals" & "goal(id: goalId)" to the API. Check out cc
This is great stuff, thanks!
Seems like doing a "goals" query keeps returning a 204 (no content) for me. It works fine from the API explorer, but any call to this endpoint from my code succeeds but doesn't return anything. Any idea on what may be up with this? EDIT: This has now been resolved on the server-side.
Hi, I've got a quick question about mutations. When attempting to mark a goal as complete, I only get returned {"data":{"goalMarkAsComplete":{"node":null}}} Is this intentional? As it doesn't actually seem to perform the action. Here is my request: mutation { goalMarkAsComplete(input: {clientMutationId: "\(clientId)", goalId: \(goalId)}) { node { id, completedAt, createdAt, title, user { name, id, profileImage, username } } } } And what is the clientMutationId? Is it just a random String or the client ID that's retrieved when authenticating? EDIT: After looking at the error, it's an access_denied error, any way to resolve this?
please write to with your API Key included in the message.
Thanks, done it now. Also, I was wondering on when goal creation support will be coming?
I see some planned updates to APIs here and see recent changes on github. Will the docs be updated asap or do we need to keep an eye here and on github?
hey, any updates to the GraphQL interface of the API will always reflect in the reference here Unfortunately we don't have a change-log yet so we've decided to publish those updates here as well for the Makers festival participants.
thank you! :)
Is there a way to know which images are GIFs and which are static from media field?
I'm afraid not and we do not plan to expose that information.
Thanks. I'll figure something out. I see that the order of media in the API is different than that on the website. is that bug or website uses some type of sorting?
hi, still pretty new on this graphql things, but it seem like no way to filter the records ? like if I want to filter all my goals that complete only ? I can only fetch all and filter locally ?
hey, you can filter "goals" by using "completed" flag here Setting `completed: true` on the query will result in only completed goals being fetched.
Got it , i use Viewer to check, is a bit funny, when checking own goal cannot filter by using completed flag
Hello, how can I get all user following and do not rest against the limit of the API? For example, I want to see what people which I follow do on PH(upvote something, comment, add/finish goal)
you can look up "followers" for a user. check here If you run into rate limit issues try fetching "followers" on a per "user" basis. We do not support subscriptions as of now, so to get a "user"'s activity you would have to regularly poll for the specific data and detect changes in that on your end. For e.g 1. To detect if a user upvoted a new post, you could poll for "votedPosts" list on the "user" object. 2. To detect changes to user's goal, you can poll "goals(userId: idOfUser)" connection with 'NEWEST' filter.
If user have 1000 following, I need make 50 request and it's more than 6250 points. 6250 points it's for all app limit or per auth user?
in cases such as above you'd have to throttle your requests, rate limit quotas reset at every 15m interval.
Getting the following error during goalCheer mutation. { "data": { "goalCheer": { "node": null, "errors": [ { "message": "access_denied", "field": "base" } ] } } }
hey, we've just released some fixes to the API. could you retry the same mutation? Incase the issue still persists, please write to us at with your API Key & the input you are using for the mutation.
Hi, I am facing a problem with pagination when I query "posts" ordered by votes , where "hasNextPage" field is always false. My query is { posts (order:VOTES, after:"MjA=") { edges{ node{ id name votesCount } } pageInfo { endCursor hasNextPage } } } For this query "hasNextPage" field is always coming as false. Also the order of nodes I am getting is not exactly in order for instance , this is one of the ouputs where post are not in proper descending order. { "node": { "id": "100183", "name": "Feather Icons", "votesCount": 5118 } }, { "node": { "id": "53552", "name": "Carrd", "votesCount": 4723 } }, { "node": { "id": "52794", "name": "Stripe Atlas (Pre-Launch)", "votesCount": 4890 } }, { "node": { "id": "25535", "name": "Startup Launch List", "votesCount": 4890 } }, { "node": { "id": "108401", "name": "Sublime Text 3.0", "votesCount": 5122 } },
Also what I have noticed that not all the products are present in the output, when I use the UI I can see many other products which are missing from the API output. Example "remove.bg" which should be 3rd in terms of votes is not present in the output but "Startup Pitch Decks" is present at 3rd position. { "node": { "id": "14717", "name": "Startup Stash", "votesCount": 18382 } }, { "node": { "id": "76", "name": "Slack", "votesCount": 14591 } }, { "node": { "id": "75048", "name": "Startup Pitch Decks", "votesCount": 9388 } },
hey, we have an existing issue with pagination. Please add "(first: 20)" to the connection params for now. I'll update here once the issue is fixed.