G2 Developer Portal
  • 11 Apr 2025
  • 2 Minutes to read
  • Dark
    Light

G2 Developer Portal

  • Dark
    Light

Article summary

G2 Developer Portal provides secure, self-serve access to API tokens, test environments, and documentation, enabling you to build and optimize with G2’s API.

How to generate an API token using G2 Developer Portal

Getting started

To begin using the Developer Portal, follow these steps to create an account and set up your organization:

  1. Navigate to G2 Developer Portal, then select Create an account.
  2. Verify your email.
  3. When prompted, enter your Organization Name and choose a unique Organization Slug.

Promt to enter organization information during account creation to access G2 Developer Portal

Your organization slug becomes part of your Developer Portal URL (https://my.g2.com/developers/your-slug). If your desired slug is already taken, you will receive an error.

G2 recommends choosing a slug that closely matches your organization name or domain.

Once your organization is set up, use your organization-specific Developer Portal URL to log in at any time.

API Tokens

The API Tokens tab enables you to generate new tokens, and view the access roles associated with each token. Your API tokens are used to authenticate requests for G2 content.

How to generate an API token using G2 Developer Portal

For a full list of endpoints available to G2 partners, refer to G2's partner API reference documentation.

To create a new API token:

  1. Enter a Label for your API token and select Generate a token. G2 adds your token to the API Tokens panel.
  2. Select the Eye to reveal the token.

Select the Eye icon to reveal an API token in G2 Developer Portal

API tokens expire one year after creation and must be regenerated for continued access.

Access roles are dependent upon your subscription. For more information, please contact your G2 representative.

To delete a token, select the X icon for the token.

Select the X icon to delete an API token in G2 Developer Portal

To learn more about G2’s syndication API, refer to the Get started with G2 review syndication and Get started with G2 taxonomy syndication documentation.

Testing your API token

After generating an API token, you can test it using the G2 API reference documentation. This interactive documentation enables you to authenticate with your token and make API calls directly in the browser.

Copy the API token, then navigate to Developer Resources and select Visit Swagger

To test your token:

  1. In the API Tokens panel, select the Eye to reveal the token and then copy it.
  2. Navigate to the Developer Resources tab, then select Visit Swagger.
  3. Select Authorize, then paste your API token in the Value field and select Authorize.

Select Authorize and then paste your API token in the Value field

  1. Select the endpoint, then select Try it out.

Select Try it out to enter parameters and make an API call in Swagger

  1. Enter any required or optional parameters, then select Execute.

Sample response


{
  "data": [
    {
      "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000028",
      "type": "products",
      "attributes": {
        "detail_description": "Description",
        "domain": "example.com",
        "g2_url": "http://www.lvh.me:63479/products/product-one/reviews",
        "image_url": null,
        "name": "Product One",
        "public_detail_url": "https://www.example.com",
        "review_count": 0,
        "slug": "product-one",
        "star_rating": 2.5,
        "write_review_url": "http://www.lvh.me:63479/products/product-one/take_survey"
      },
      "relationships": {
        "categories": {
          "data": [
            {
              "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000025",
              "type": "product_categories"
            }
          ]
        },
        "discussions": {
          "data": [
            {
              "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000011",
              "type": "discussions"
            }
          ]
        },
        "vendor": {
          "data": {
            "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000021",
            "type": "vendors"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000025",
      "type": "product_categories",
      "attributes": {
        "name": "test"
      }
    },
    {
      "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000011",
      "type": "discussions",
      "attributes": {
        "attribution": {
          "text": "Verified by G2",
          "url": "http://www.lvh.me:63479/products/product-one/reviews",
          "logo": "http://www.lvh.me:63479/assets/g2-logo-rorange.svg"
        },
        "comments_count": 0,
        "comments_present": false,
        "content": "Some discussion stuff...",
        "created_at": "2022-01-01T00:00:00.000-06:00",
        "is_public": true,
        "official_response_present": false,
        "product_id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000028",
        "product_name": "Product One",
        "report_url": "http://www.lvh.me:63479/discussions/a-discussion/concerns/new",
        "seeded": false,
        "slug": "a-discussion",
        "title": "A Discussion",
        "type": "product_question",
        "url": "http://www.lvh.me:63479/discussions/a-discussion",
        "vendor_question": false,
        "verified_current_user": true,
        "votes_down": 0,
        "votes_up": 1,
        "votes_total": 1
      },
      "relationships": {
        "user": {
          "data": {
            "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000008",
            "type": "users"
          }
        },
        "comments": {
          "data": []
        }
      }
    },
    {
      "id": "aaaaaaaa-bbbb-4ccc-8ddd-000000000021",
      "type": "vendors",