Print

Import Bungie Data to Sheets

In this guide, we’ll walk through how to import Bungie data directly into Google Sheets, using the API Connector add-on for Sheets. We'll set up a custom OAuth connection and connect to their API.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get your Bungie OAuth Credentials

  1. Log in to Bungie.net and navigate to https://www.bungie.net/en/Application
  2. Click Create New App
    bungie-createnewapp
  3. Fill in the form as follows:
    • Application Name: enter any name
    • Website: enter any website
    • OAuth client type: public (or confidental)
    • Redirect URL: https://script.google.com/macros/d/12COOkin8nodCH7fZGIBu0D2jWY8-AEA0uvElt4Ph4wRbLUD4wslqQUfG/usercallback
    • Scope: select your scopes
    • Origin header: leave blank
  4. Agree to the terms and click Create New App
    bungie-configureapp
  5. You'll now be presented with an API key and client ID. Copy these as we'll need them shortly.
    bungie-credentials

Part 2: Connect Bungie to API Connector

  1. Open up Google Sheets and click Extensions > API Connector > Manage Connections
  2. Scroll to the bottom of the sidebar and click Add Custom OAuth
  3. Fill in the Custom OAuth modal as follows:
    • OAuth Grant Type: Authorization Code
    • Name: Custom Bungie
    • Authorization Base URL: https://www.bungie.net/en/OAuth/Authorize
    • Token URL: https://www.bungie.net/Platform/App/OAuth/token/
    • Client IDprovided by Bungie
    • Client Secretleave blank if you created a public app; otherwise enter the client secret provided by Bungie
  4. Click Save
    bungie-customoauth
  5. Click Manage Connections to return to the list of connections
  6. Scroll down until you find your new custom connection. Click Connect
    bungie-connect
  7. You'll be prompted to give access to the new app you created above. Click Approve
    bungie-approve

  8. You'll be returned to your sheet and can verify that the new connection is now active.

Part 3: Get Bungie Data in Sheets

To create a request, include your full request URL in the request URL field, select your custom Bungie connection from the dropdown OAuth menu, and add an X-API-Key header key.

You can see information about endpoints and parameters in the API documentation. For example, to get user memberships, run a request like this. Substitute in your own API key where it says your_api_key.

  • Application: Custom
  • Method: GET
  • Request URL: https://www.bungie.net/Platform/User/GetMembershipsForCurrentUser/
  • OAuth: Custom Bungie
  • Headers:
    • X-API-Key: your_api_key

Part 4: API Documentation

Official API documentation: https://bungie-net.github.io/

Leave a Comment

Jump To