How to obtain an AUTH Key from the IGDB API using POSTMAN

In this tutorial you will learn how to obtain the API, Secret and AUTH Keys to use the IGDB integration in our WordPress Themes.

To obtain an AUTH Key (the “AUTH Key” is not equal to “Secret Key”) from the IGDB API using POSTMAN and use it on PLAYME or FLUX Themes, you will need to follow these steps:

Step 1: Sign Up for an IGDB Account

– If you don’t already have an IGDB account, you’ll need to sign up for one. Visit the IGDB website (https://www.igdb.com/) and create an account.

Step 2: Log In to Your IGDB Account

– Once you have an IGDB account, log in to it using your credentials.

Step 3: Create a New Application on IGDB**- After logging in, go to the IGDB Developers Portal (https://api-docs.igdb.com/)

– Click on “Get Started” if this is your first time using the API.
– Create a new application following the instructions on https://api-docs.igdb.com/#account-creation
– Click “Register App” to generate your application (https://dev.twitch.tv/console/apps/create). Fill in the required information for your application, including the name, category, and site URL. These details will be used to generate your AUTH Key.
– You will receive a Client ID and Client Secret. Keep these credentials secure.

Step 4: Configure Your POSTMAN Environment

– Open POSTMAN (if you don’t have POSTMAN installed, download and install it from https://www.postman.com/).
– Create a new environment or FORK in POSTMAN or use an existing one for IGDB.
– Add two variables to your environment:
client_id: Set this to the Client ID you received when you created your IGDB application.
client_secret: Set this to the Client Secret you received when you created your IGDB application.

Step 5: Obtain the AUTH Key

– In POSTMAN, create a new request.
– Set the request type to POST.
– Enter the following URL:

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

and selecting on authorization type “Bearer Token”.

Step 6: Send the Request

– Click the “Send” button in POSTMAN to send the POST request.
– If everything is configured correctly, you will receive a response from IGDB containing your AUTH Key.

 

Step 7: Test the Keys

Next you can test a GET Response with a url like

https://api.igdb.com/v4/games/20009?fields=cover.image_id,summary,storyline,alternative_names.name,genres.name,game_modes.name,category,keywords.name,platforms.name,age_ratings.rating,involved_companies.company.name,artworks.image_id,release_dates.date,videos.video_id,websites.url,collection.name,franchises.name

If response gets the data correctly, then your generated Keys works.

Step 8: Use the AUTH Key

– Once you have obtained your AUTH Key and tested, you can place it in the FLUX or PLAYME theme Options.

That’s it! You have successfully obtained an AUTH Key from the IGDB API using POSTMAN, and you can now use it to make authenticated requests to the API. Remember to keep your credentials secure, and do not share them publicly.

 

Extra: Troubleshooting when API not import data

In some cases it may happen that data is not imported directly from the API although it was previously imported correctly. If this happens, what should be done is pass the corresponding Keys through POSTMAN and if it gives an authentication error, you will only have to regenerate the “AUTH KEY” because it has an expiration time.

Simply repeat the process on Send the Request on the “POST” tab (DO NOT CONFUSE WITH “GET”). It generates again an “Access Token” on the “Body” results:

Then copy the generated “Access Token” and paste after “Bearer” on “Authorization” (“Headers” tab), then click SEND to test again on the “GET” Games Test:

Once this is done the import will work correctly again.

Finally, as on Step 8: Use the AUTH Key, once you have regenerated your AUTH Key and tested on Postman, you can paste it on the FLUX or PLAYME Theme Options in the “IGDB Auth Key” Field.