web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Configure external API Rest in power pages

(0) ShareShare
ReportReport
Posted on by 5

Hello everyone.

 

We are designing a portal for a client using power pages. We have some external APIs by the client (they return PDF). We have done tests with js and everything goes well, we can visualize those pdf.

 

Using the help of Postman we use Javascript fetch. We do not know how to implement the authentication and the URL in power page, for security we must configure that part.

 

Also comment that the URL of the queries there are values ​​that we concatenate with code liquid, I explain:

 

On one page we display the details of a record from our CRM using:

{% if request.params.id %}
{% assign invoice = entities['dev_invoice'][request.params.id] %}

This way I can use invoice.dev_numberInvoice inside a variable:

var number = '{{dev_numberInvoice}}'; //dev_numberInvoice is a column of my table

And in the API URL it would be something like this:

var myHeaders = new Headers();
  myHeaders.append(
    "Authorization",
    "tokentokentokentokenslkjdlskdjlsakdj"
  );

  var requestOptions = {
    method: "GET",
    headers: myHeaders,
    redirect: "follow",
  };
var urlAPI = "https://customercompany.com/api/v1/customer/22/invoice/"   number;

fetch(urlAPI, requestOptions)
.then........

You can see that the 22 of the URL can be another field, a lookup

 

I have been able to do all this within the editor at the bottom of the power page, but of course it would not be correct.

How can I configure the token that this external API gives us in power pages? I have seen Nodejs being used, but I don't know if I can use all of that within the microsoft environment.

Other information I have found is OAuth 2.0 implicit grant flow within your portal, but I'm not sure if inside power pages or make.powerapps.com it can be done.

I would appreciate help or knowing where I can start.

Thank you very much.

Best Regards.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans