ballerinax/hubspot.files Ballerina library

2.3.2

Overview

The HubSpot connector(https://www.hubspot.com/) OpenAPI specification.

These APIs allow to upload and manage files.

Key Features

  • Programmatic access to create and manage resources via REST API
  • Manage user accounts and profiles
  • Support for webhooks and event-driven workflows
  • Secure authentication with API key or OAuth support

Prerequisites

Before using this connector in your Ballerina application, complete the following:

  • Create a HubSpot developer account
  • Obtain tokens
    • Use this guide to obtain the credentials which are needed to create the <CLIENT_ID> and <CLIENT_SECRET>

Quickstart

To use the HubSpot Files connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

First, import the ballerinax/hubspot.files module into the Ballerina project.

Copy
import ballerinax/hubspot.files;

Step 2 - Create a new connector instance

You can now make the connection configuration using the access token.

Copy
files:ClientConfig clientConfig = {
    auth : {
        token: <ACCESS_TOKEN>
    }
};

files:Client baseClient = check new Client(clientConfig);

Step 3 - Invoke connector operation

  1. Upload a file
Copy
files:Body payload = {
    file: "",
    fileName: ""
};

files:File|error bEvent = baseClient->filesUpload(payload);
if (bEvent is files:File) {
    log:printInfo("Created File");
} else {
    log:printInfo(msg = bEvent.message());
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/hubspot.files;Copy

Other versions

See more...

Metadata

Released date: 3 days ago

Version: 2.3.2

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.8.0

GraalVM compatible: Yes


Pull count

Total: 30

Current verison: 0


Weekly downloads


Source repository


Keywords

Type/Connector

Vendor/HubSpot

Area/Storage & File Management

Content & Files/File Management & Storage

Cost/Freemium


Contributors