Any way to avoid URL param of REST request getting URL encoded?
Application Type
Traditional Web
Service Studio Version
11.10.22 (Build 42083)

I have the following REST request containing a '@' character and it would need to stay that way. However, it's getting URL encoded to '%40' - see picture

Any way to prevent this?

I  also tried passing it as a parameter '... /users/{User}' but has the same issue.

Champion

Hi Aam,

Can you tell us the detailed error information?

Kind regrads,

Hello Adam,

Can you try to pass it directly from Input Parameter?

Try to pass @ as a part of input parameter.


Thanks,

Krunal

Thanks for the replies!

The error is 400 and can reproduce it through debugging as well, of course:

 Yes, I tried passing the info through a parameter as well, but have the same problem:

Looks like, inside the "Test" part of the REST editing dialog, it does not URL encode the '@' when sending the request, so it returns successfully:

If I URL-encode '@' there too (as is done unfortunately in the real run environment) then can reproduce the same error:


Also tried setting the input parameter to data type 'Email' just in case the '@' character might be treated in a different way - but it did not help

Champion

Hi Adam,

Did you try it in postman or browser directly?

Kind regards,

Hi Adam,

I think you got the right path when encode URL the "@" character.
However, as the response message indicated, you can only use "@me" with 3 legged token.
That mean, the Token that use passed in the Authorization is not correct. You can refer further here : https://forge.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token

Hi Nghia,

That's how I interpreted the message as well at first, but it's actually the other way round.
What it actually says is that when using a 3-legged token (and that is what I'm using) and not a 2-legged one (which might be used by internal services) you can only call that endpoint with '@me' as the user - and not '%40me'
You can try other user names as well (apart from '@me') and you'll get the same error message.

Hi Tom,

Yes, it works in Postman as well:

As I showed in a previous reply, it even works in the "Test" tab of the REST call editor in outsystems Service Studio.

It just does not work in the real run environment as '@me' gets URL-encoded to '%40me' - you can see that from the error log in outsystems Service Center under Monitoring >> Integrations 

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