Request Template invokation for platform 2.3 not working as expected

Hi,

So i am updating my app from platform 2.2 to 2.3, and the major change I am not able to implement is the Request template invokation. I have done everything as per the official docs but my requests are throwing me 500 error. If somebody can solve my issue that will be a huge relief. Below are the screenshots of my various files that i have done changes in as per the official docs.

My first API is a simple login API.
It’s curl request can be put as -
curl -XPOST -H ‘Authorization: Basic ’ ‘https://myserver.co.in/api/v1/login?key=true&break=true

Now i need to mimic the above API via request template invokation
My requests.json file -

My manifests.json file -

And this is how I am invoking the request template -

Request execution log is as below. Here the “isOAuth” flag is going as true which i have no idea WHY ?? According to docs its default value is false and I havent set this flag in the requests.json file

Console log response from my server. It is returning error as my server is not getting request in appropriate format.

Any help will be greatly appreciated

My login API is as follows
curl -XPOST -H ‘Authorization: Basic loginApiToken’ ‘https://myserver.co.in/api/v1/login?key=true&break=true’

please send “Content-Type”: “application/json” header with the request.

500 means internal server which means the api failed to return any response

1 Like

Hi,

I did the below change , but still facing same issue -

Console error log -

API execution log (Still OAuth flag is going as true which should be false by default)

please hit the same api url with the same basic authorization and params from postman and please share the same ss here .

HI,
PFB
One obvious mistake i found was i was using POST method whereas my API is GET method. I have changed that, but still no success

can you share the logs for api call outs ?
you can find that inside logs folder in your project

Hi,

Thanks for pointing out the log folder, it helped me debug my API call, the problem was while invoking the request template, i was passing auth token as “Basic authToken” and in requests.json was again using “Basic <%=context.apiToken%>” , so the “Basic” was getting passed twice and it was causing error. Thanks alot for your help, I will make changes in all my APIs now and incase i face issues will post out again :slight_smile: . Thanks alot once again!

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.