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 / Obtain JWT token with ...
Power Automate
Unanswered

Obtain JWT token with Power Automate HTTP

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I am trying to estaablish a flow that interfaces the Perdoo API (https://api-docs.perdoo.com/)

 

I can make the flow work from a browser, but I cannot figure out how to specify correctly the email and password required to obtain the token (https://api-eu.perdoo.com/api-token-auth)

 

Using the HTTP step

- Method: POST

- URI: https://api-eu.perdoo.com/api-token-auth

- Header: 

-- Content-Type: application/vnd.api+json

 

I've tried specifying credentials using basic authorisation, but below fault is returned independently of whether I do that or not.

 

Where I think it goes wrong is how to specify the body. 

 

The fault returned is:  

"{"errors":{"email":["This field is required."],"password":["This field is required."]}}"

 

Any help is appreciated 

Thanks

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    Try this in your HTTP Body

     

    image.png

  • Community Power Platform Member Profile Picture
    on at

    Thanks, but then it immidiately returns "Enter valid JSON"

     

    Other ideas?

     

    Screenshot 2020-11-03 091026.jpg

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    Try with the double quotes around the email and password

     

    {

    "email":"xxxx",
    "password":"dddd"
    }

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks! That solved the immediate parsing error, but now I get this error:

     

    {"errors":[{"detail":"Received document does not contain primary data","status":"400","source":{"pointer":"/data"},"code":"parse_error"}]}

     

    Any ideas are most welcome!

  • Verified answer
    DmitriiKubyshev Profile Picture
    Microsoft Employee on at

    Based on examples in their docs, try one of these:

    1. Content-type: application/vnd.api+json

    Body:

    {
    "data": {
    "type": "obtainJwtToken",
    "id": null,
    "attributes": {
    "email": "xxxx@xxx",
    "password": "xxx"
    }
    }
    }

     

    2. Or set

    Content-Type: application/x-www-form-urlencoded

    Body: email=myuser%40test.com&password=xxx

  • Community Power Platform Member Profile Picture
    on at

    That worked - Thanks all that contributed!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard