How to use JSON connectors to pull data via 2 API calls with an Access Token

In order to make API calls to the endpoints, you must first obtain an access token using your
client_id and client_secret. These credentials are given when you create an API client inside the
shellyak application.
Once the access token has been obtained, it is used on subsequent calls to the API to verify your
access.
Authentication
Get Access Token
Request:
$ curl \
-H "Content-type: application/json" \
-d '{"grant_type": "client_credentials", "client_id": "XXXXXXXXXXXX",
"client_secret": "XXXXXXXXXXXX"}' \
https://auth.shellyak.com/oauth/token
Response:
{
"access_token": "{{ACCESS_TOKEN_VALUE}}",
"refresh_token": "{{REFRESH_TOKEN_VALUE}}",
"expires_in": 3600,
"token_type": "Bearer"
}
API Calls
Get All Locations
Request:
$ curl \
-H "Content-type: application/json" \
-H "Authorization: Bearer {{ACCESS_TOKEN_VALUE}}" \
https://app.shellyak.com/api/location
This is a two-step way to pull data. Any thoughts? Thanks!
I think I should use JSON No Code Connector twice. First, save the token, then use that to pull the actual data.
Best Answer
-
The JSON No Code OAuth connector can do this, when you create the connector account you should choose the Client Credentials flow, and Pass Client ID and Secret in Basic Authentication Header options. In the Access Token URL textbox paste in the URL that you use to get the access token.
0
Answers
-
I figured it out.
But I wonder if a JSON connector can programmatically grab an access token from a dataset and pass it into the header.
I will fiddle with the JSON No Code OAuth Connector because it might be useful.0 -
The JSON No Code OAuth connector can do this, when you create the connector account you should choose the Client Credentials flow, and Pass Client ID and Secret in Basic Authentication Header options. In the Access Token URL textbox paste in the URL that you use to get the access token.
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 107 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 775 Beast Mode
- 75 App Studio
- 43 Variables
- 734 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 63 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 403 Distribute
- 117 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 137 Manage
- 134 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive