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 :
But when I do the same in Power Automate it doesnt work :
Result :
Could it be a certificate problem ?
Thanks to all for your help 🙂
Thanks very much for the informations, I'll have a look a learn about it 🙂
Look at the Raw tabs in Postman, see what's really happening.
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 ?
When you use Base64decode on this
eyJqc29ucnBjIjoiMi4wIiwiaWQiOiJlcnJvciIsImVycm9yIjp7Im1lc3NhZ2UiOiJpbnZhbGlkIHNjaG9vbG5hbWUiLCJjb2RlIjotODUwMH19
you get
{"jsonrpc":"2.0","id":"error","error":{"message":"invalid schoolname","code":-8500}}
🙂
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 ?
Great, you get stuff back. Your content is Base64 encoded. Decode it and then use that.
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 :
When posting with them, I receive the following answer :
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 :
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}
So I dont know howto define my html component to make it working ...
Thanks to all for your help 🙂
Likely you need to explicitly specify the expected content type.