Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

API for verifying a user owns my game?​​

A topic by tinspin created Aug 01, 2020 Views: 964 Replies: 3
Viewing posts 1 to 4

Does anyone know if this exists and if so where the docs are?

Moderator(+1)

On Itch.io’s server side API, it mentions you can see someone’s games details.

On Itch.io’s OAuth Applications, it mentions how to make requests on behalf of another user.

I haven’t tried them, but it sounds like if you combine those two, it would be exactly what you were looking for, right?

(8 edits)

Seems a bit over-engineered to me, I would prefer a http://itch.io/purchases?name=A&user=B that returns:

{'products':[{'name':'blabla','price':1.5}]}

or something... that only lists all products B owns from A.

Right now if I want to do this without asking the users permission I have to scrape the Payments tab on my Dashboard and paginate like a mad man if I'm successful!?

Github has the same problem with their sponsorship. There I have to paginate through one big list of sponsors with their GraphQL API!

But wait seems they have exactly what I want:

https://itch.io/api/1/KEY/game/GAME_ID/purchases

that returns

{
   "purchases":[
      {
         "donation":false,
         "id":11561,
         "email":"leaf@example.com",
         "created_at":"2014-02-28 00:25:09",
         "source":"amazon",
         "currency":"USD",
         "price":"$1.00",
         "sale_rate":0,
         "game_id":3
      }
   ]
}

I just need to figure out all the authentication business...

Edit: ok, that was easy, but user_id is a integer how do I get that?

Asking for mail is worse for integrity than username...

Is there a API for getting user_id from username, or do I have to ask for the email address the user used on itch?

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.