consume Rest Api Post causing timeout

Hello,

I am new in integration, so i was exploring a little bit with the metro API of lisbon, so now i'm having a problem when tryng to execute a CURL method that returns me the token, to consume the needed methods from the API, now i got all the methods implemented and working with the token provided manually.

But when i try to TEST the POST method (curl) i get the correct values for the token as you can see in 1st image.

Finally when i try to use the server method on the screen preparation to get the token, i get "The operation has timed out"...

I can't understand what is happening... For some days i was checking for useful info, and testing it, but still no result...

In ServiceCenter i got the error trace, and i've got the full Loging level to see all the message, and still no result...


In atachment i provide you:

1- the test CURL method

2-Screen Preparation and Server action to refresh the Token

3- Error log in Service Center

4- The propertyof integration

.

If anyone got a solution, i'l be grateful!

Best Regards

Vasile

Hi Vasile,

To me it seems to be a communication issue (network), probably a firewall blocking requests to the metro API endpoint.

Is the OutSystems server able to connect to external endpoints, such as the one you're using in this example?Maybe you need to define a proxy be able to connect to external API's or open an exception.


Best regards,
Paulo Jadaugy

Paulo Jadaugy wrote:

Hi Vasile,

To me it seems to be a communication issue (network), probably a firewall blocking requests to the metro API endpoint.

Is the OutSystems server able to connect to external endpoints, such as the one you're using in this example?Maybe you need to define a proxy be able to connect to external API's or open an exception.


Best regards,
Paulo Jadaugy

Hi Paulo, 

Actually I tested it at home and after that at school, where I had to ask to open a exception for the communication... But il do a try with a proxy 


Solution

Got the solution...

It was a grant_type that wasn't expecified!

Thank you 

Solution