Game Detail API

hi , i am trying to develop game app, in my app i need some data like Live game List and game detail with team list means i need to display the team which are playing the game currently

i need to display result also, which team was winner and all other detail

i checked the API document and i get the stream game list but i did not get the team list can you help me with that?

As in Twitch teams or “in game which team the player is on”?

Not sure what you are referring to

i am trying to find the API which provide me the game detail means game , name description video url and most important is payers detail of this game so i can display the player list to my application user

i am looking for this right" in game which team the player is on"

There is no Twitch Provided API for this.

Games don’t feed this information to Twitch

What video URL do you want?

If you pull a given gameID from the Twitch API, you can use that with IGDB’s API (as IGDB powers the categories) to lookup game data such as description

See

Which provides a method on getting the IGDB game from the Twitch game ID

hi thank for this suggestion i try it but api call need authentication token and i try to generate it using
this url

https://id.twitch.tv/oauth2/token?client_id=abcdefg12345&client_secret=hijklmn67890&grant_type=client_credentials

but it gave me 404 error i replace my client id and secret with this url but did not get any token

Are you using a POST request like the documentation specifies? A GET request wont work.

thanks it work i generated the token and try to call the api https://api.igdb.com/v4/games using generated token but its give me the response

{

"Message": "User is not authorized to access this resource with an explicit deny"

}

i can not understand it

IGDB’s API only accept a client credentials token, this suggests you used a user access token in error

i generated the token using this api : https://id.twitch.tv/oauth2/token?client_id=abcdefg12345&client_secret=hijklmn67890&grant_type=client_credentials

i get token but it’s give me same error in this api : https://api-docs.igdb.com/#game

{
“Message”: “User is not authorized to access this resource with an explicit deny”
}

That’s exactly what I do and it’s working as expected.

Can you show the code you are using so we can check the flow?

hello we are trying to build postman collection for developer after that we are starting to code with android application

First request for IGB request token : https://id.twitch.tv/oauth2/token?client_id=96f63f6cfvejtqto0ncoh0rt03ma5i&client_secret=REMOVED&grant_type=client_credentials

after call this api i get response :

{
“access_token”: “REMOVED”,
“expires_in”: 4891877,
“token_type”: “bearer”
}

using this request token i try to call API :

curl --location --request POST ‘https://api.igdb.com/v4/games
–header ‘Client-ID: Client ID’
–header ‘Authorization: Bearer REMOVED’
–header ‘Accept: application/json’
–header ‘Content-Type: application/x-www-form-urlencoded’
–header ‘Cookie: __cfduid=da9979fe9f5ba5fd12e31650f442304941607588259’
–data-urlencode ‘fields age_ratings,aggregated_rating,aggregated_rating_count,alternative_names,artworks,bundles,category,checksum,collection,cover,created_at,dlcs,expansions,external_games,first_release_date,follows,franchise,franchises,game_engines,game_modes,genres,hypes,involved_companies,keywords,multiplayer_modes,name,parent_game,platforms,player_perspectives,rating,rating_count,release_dates,screenshots,similar_games,slug,standalone_expansions,status,storyline,summary,tags,themes,total_rating,total_rating_count,updated_at,url,version_parent,version_title,videos,websites;=’

Response :

{

"Message": "User is not authorized to access this resource with an explicit deny"

}

Edited your post to remove your leaked client secret and generated access token. You shouldn’t publish these publicly!

You should make sure you are using postman desktop for this, as postman web will interfere with extra cookies.

You’ll also need to create a proxy to handle the requests (and potentially cache requests to same duplicate lookups) as due to CORS limitations the Android app itself will not be able to make the request directly.

Your problem is likely the use of postman rather than a problem with your token itself. Skip postman and use something similar to what you will use in reality.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.