JSON No Code Connector - Base64 Encode and Basic Authentication?
Hi All,
Does anyone know how to use the JSON No Code (or any of the JSON connectors, really) to do basic authentication via a client id and secret where the client id/secret are base64 encoded?
Based on the API documentation, I need to pass the following header where the client id:secret string is base64 encoded.
Authorization: Basic <client id:secret>
So what I did was take the client id:secret string, and ran it through base64encode.org so I ended up with the following:
However, when I try to get a preview, I get the following error:
When I do my own manual curl request via command line, I get back data. So I'm not sure if I'm leveraging the JSON connector correctly. Any help would be greatly appreciated.
Answers
-
Is that word "Basic" supposed to be in the authentication value? That doesn't look like part of the base 64 string.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
@ArborRose according to their python API sample, it should be "Authorization: Basic <base64 encoded id:secret>
Looking at cURL documentation, this is the correct and expected way to specify basic authentication in a header:
curl \ --header "Content-Type: application/json" \ --header "Authorization: Basic $AUTH" \
So in theory, what I have setup in the json no code connector should work.
0 -
Here's the way I do it in Python. In your comments, you use "Authentication". But in both of our code examples, we're showing "Authorization".
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
@ArborRose - I caught that and changed it right after posting. Still getting the same result. Looking at the network inspector what I seem to be getting back during the preview is an internal server 500 error from domo went it tries to execute the curl command.
Starting to think I need to go back to the client and see if maybe the way they set things up for my auth is incorrect or something. I'll keep messing with it.
Thanks for the help!
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive