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.