REST API Integration Issue

I am trying evaluate AppGyver by connecting to an existing REST Service I have used previously in another app I previously developed in Visual Studio. Using your REST API direct integration resource page to configure access, I am getting a “Error: JSON error response from server: {“error”:“unsupported_grant_type”}.status: 400”. The reason is fairly obvious comparing the headers and request body, which I have included below for both working and non-working calls. I’ve removed potentially sensitive information from them. The issue seems clear, but given my unfamiliarity with AppGyver perhaps I’m just not using the system correctly.

First the non-working call generated by AppGyver:

POST https://xxxxxx.xxxxx.xxx/Token HTTP/1.1
Host: xxxxxx.xxxxx.xxx
Connection: keep-alive
Content-Length: 81
sec-ch-ua: " Not A;Brand";v=“99”, “Chromium”;v=“90”, “Microsoft Edge”;v=“90”
DNT: 1
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/00.0.0000.000 Safari/537.36 Edg/00.0.000.00
Content-Type: application/x-www-form-urlencoded
Accept: /
Origin: https://platform.appgyver.com
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://platform.appgyver.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

{“password”:“xxxxxxxxx”,“username”:“xxxxx@xxxxxx.xxx”,“grant_type”:“xxxxxxxx”}

Error: JSON error response from server: {“error”:“unsupported_grant_type”}.status: 400

Then the working call out of Postman:
POST https://xxxxxxxx.xxxxxxx.xxx/Token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: PostmanRuntime/7.28.0
Accept: /
Postman-Token: bdf51a41-cdf4-49b6-8bb5-5aad497ce920
Host: xxxxxx.xxxxxx.xxx
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 71

username=xxxxx%40xxxxxxx.xxx&password=xxxxxxxxxxx&grant_type=password

It appears AppGyver only generates json rather than the required application/x-www-form-urlencoded string. Is this the case? Is there some other way to generate the correct output using AppGyver?

Thanks in advance.

m.

You have to set that in your POST function
Capture

Thank you for your assistance.

That would make things a lot clearer, but I’m not seeing that interface. Can you point me in the right direction?

Thanks.

m.

I see your dilemma. Im using the ‘HTTP Request’ flow function instead of the built–in REST API functions (Create Record, Update Record, etc…).

Never mind. I found it. Thanks for your help.

m.

Thank you for your response. I had figured it out, but would not have done so without your assistance.

Thanks again.

m.

Yep you’re very welcome. Glad to have helped.

Hi,
I noticed your reply but not managed to make it yet. Would you please check up my issue

regards,