Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jonas1
Helper I
Helper I

Custom connector to API using Python/JavaScript?

Hi, 

 

 

I am currentely trying to connect to an API using OAuth2, so I figured I try out Power Query SDK and custom data connectors. However, is this possible no matter what programming language the API requires?

 

I am trying to obtain the API token which contains three steps: 

. Obtaining the API token contains 3 steps:

  1. Get Challenge (startlogin probably)
  2. Create Challenge Response (finishlogin?) à and this is where I find it confusing
    • The source code for this step is given in multiple languages, but none of them are json or xml, is it still possible to do everything in Power Query SDK?
    • Here is the code which should create a challe response from Secret key and challenge:image.png
  1. Get Token (still finishlogin)

 

The response in both step 1 and 3 is in application/json format, while step 2 do not give a response in itself. So I am not quite sure what to do with step 2, is one of these programming languages mandatory or just suggested?

3 REPLIES 3
wes2015
Frequent Visitor

Hi @Jonas1 , did you manage to get the connector to work?

I'm also working with the scania API and im stuck, can you give any hints on how to proceed?

 

Thanks

Wes

ananeto
New Member

Not sure if this helps, but have you considered getting a ready made connector instead of building one from scratch? 

 

When building a connector from scratch, besides all the hard work getting it to work in the first place, there can a significant maintenance effort every time the API changes... 

 

Why don't you check an out-of-the-box solution like  https://www.connecting-software.com/connect-bridge/ maybe they have the connector you need? And then you can link to it from Python, no problem.

Hi @ananeto ,

 

I resolved this by setting it up myself in Python. They have designated libraries to connect to APIs and there are lots of forums/blogs that can solve the problems that arrives, so highly recommend it! I have already connected to several APIs and I thinks this is a valuable skill to have. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.