REST service authentication with "access_token"

Hello,

I’m using Apache Camel and restlet to add integration capabilities to my application. I’ve found that authenticating using the “access_token” query parameter is preferable. The problem is that when I try to call a service method in this manner I get “Service method not found” error. After digging into the code I see that the reason is due to a parameter count mismatch.

For example, if my request looks like this: http://localhost:8080/app/rest/v2/services//?arg1=xzy&access_token=6bd15c58-8daf-44b8-bd3e-fa208e458eb7, the platform fails to find the service method since there are two arguments passed in when only one is expected. Reference RestServicesConfiguration.paramsMatches().

Is there a fix/workaround that anyone is aware of?

Thank you.

Hi,
you can invoke the service method with a POST request. In this case service method parameters will be passed in the request body. See the example here: Service Method Invocation (POST) - CUBA Platform. Developer’s Manual