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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rest API connector wor...
Power Automate
Unanswered

Rest API connector working in Postman but not in Power Automate

(0) ShareShare
ReportReport
Posted on by 331

Hello all,

 

I've a connector which is working when I'm testing it in postman or other test tools but not with Power Automate.

 

I need to make a POST to the following address :

 

https://mese.webuntis.com/WebUntis/jsonrpc.do?school=gym_Biel-Bienne

Here, it works fine and I get a Session ID :

 

forstera_0-1687201946158.png

 

But when I do the same in Power Automate it doesnt work :

forstera_1-1687202085897.png

Result :

forstera_2-1687202144222.png

 

Could it be a certificate problem ?

Thanks to all for your help 🙂

 

 

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    Likely you need to explicitly specify the expected content type.

  • forstera Profile Picture
    331 on at

    Hello @lbendlin and sorry .. yes of course I forgott that, sorry.

    So, I work for a school and I need to authenticate to that application to retrieve timetables teachers and students.

     

    The authentication process should be like this :

    {"id":"ID","method":"authenticate","params":{"user":"ANDROID",
    "password":"PASSWORD", "client":"CLIENT"},"jsonrpc":"2.0"}
    The parameter CLIENT is a unique identifier for the client app. The parameter client will be
    mandatory in the future.
    result:
    {"jsonrpc":"2.0","id":"ID","result":
    {"sessionId":"644AFBF2C1B592B68C6B04938BD26965","personType"=2,"personId"=17}

    When I try to authenticate using, from example, postman or another tool I found in the web it wors with the following data :

    forstera_0-1687232397104.png

    When posting with them, I receive the following answer :

    forstera_1-1687232446998.png

    Then I can use the "SessionID" to make my request.

     

    But now, when I do the same using the html component of Power Automate, the answer is not the same and I dont receive any SessionID:

    Here's my html component to post :

    forstera_2-1687232595754.png

    and here's the answer : we can see that it's completely different that the one here above and the one expected  which should be :

    {"jsonrpc":"2.0",
    
    "id":"ID",
    
    "result":
    {"sessionId":"644AFBF2C1B592B68C6B04938BD26965",
    
    "personType"=2,
    
    "personId"=17}

     

    forstera_3-1687232642200.png

     

    So  I dont know howto define my html component to make it working ...

    Thanks to all for your help 🙂

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    Great, you get stuff back.  Your content is Base64 encoded.  Decode it and then use that.

  • forstera Profile Picture
    331 on at

    so, do you mean that if I take the following answer 

     

    {
     "statusCode": 200,
     "headers": {
     "Connection": "keep-alive",
     "requestId": "39beb5ff218dd1ae054d4634595bd368",
     "Access-Control-Allow-Headers": "Accept, Origin, X-Requested-With, Content-Type, Last-Modified",
     "Access-Control-Allow-Origin": "*",
     "Date": "Tue, 20 Jun 2023 12:51:33 GMT",
     "Server": "nginx",
     "Content-Length": "84"
     },
     "body": {
     "$content-type": "application/octet-stream",
     "$content": "eyJqc29ucnBjIjoiMi4wIiwiaWQiOiJlcnJvciIsImVycm9yIjp7Im1lc3NhZ2UiOiJpbnZhbGlkIHNjaG9vbG5hbWUiLCJjb2RlIjotODUwMH19"
     }
    }

    and I convert it to base64  

    base64ToString(MyAnswer)

    I'll get something like this ? 

    forstera_0-1687266102031.png

     

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    When you use Base64decode on this

    eyJqc29ucnBjIjoiMi4wIiwiaWQiOiJlcnJvciIsImVycm9yIjp7Im1lc3NhZ2UiOiJpbnZhbGlkIHNjaG9vbG5hbWUiLCJjb2RlIjotODUwMH19

    you get

     

    {"jsonrpc":"2.0","id":"error","error":{"message":"invalid schoolname","code":-8500}}

     

    🙂

  • forstera Profile Picture
    331 on at

    ah ok, thanks very much I understand the meaning yet.

     

    What is really strange to me is when sending informations via another tool (postman for example) it works. I just copied and pasted into the Power Automate html component. Do you think I should convert it before sending, too ? 

  • Verified answer
    lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    Look at the Raw tabs in Postman, see what's really happening.

  • forstera Profile Picture
    331 on at

    Thanks very much for the informations, I'll have a look a learn about it 🙂 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard