How is your experience with the OutSystems Community?
23
Views
2
Comments
[ODC REST APIs] Getting error after authentication when trying to call the asset API.
ODC REST APIs
Forge asset by Leandro Oliveira


Authorization works fine. 

When I call:


I get error:

With these headers (the base URL is correct):

UserImage.jpg
Francisco Franco

Hi Jay, This looks like a Forge component issue. Try updating the component, refreshing dependencies and republishing. If it still fails, test the endpoint with a standard consumed REST GET to confirm whether the issue is inside the Forge wrapper. 


2019-10-25 19-52-02
Leandro Oliveira
Champion

Hello Jay!

What inputs are being passed to the library Server Action? I've tried this on the latest version and it is working:

There is a output from GetAuthorization that already concatenates the "Bearer <token>", ready to use. If you are not decoding the token to get information from it I would recommend pass this parameter.

Can you try on the latest version? This thread is from version 1.0.0, there was a problem with ODC instances not correctly updating the HTTP method even after setting it on the OnBeforeRequest.

I've changed the current implementation to use 4 different rest call wrappers to overcome this issue. It is strange that the implementation of 1 rest call (a POST) worked perfectly on ODC Personal Environment though.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.