Gents,

I have setup an OAuth2 Client and successfully tested getting a token (Client Credential type).
Now, how can I use this in Vision? I would like to get a fresh token when needed, I would also like to read the status code of the request. Obviously will use the token to connect to another site to download other resources.
I have also tried to implement the system.net.httpClient() methods to get the token but it's not working, I am getting a 401. Have tried different header configurations, still error.
It works in Postman. I provided the Client ID and Client Secret, but Postman passes a different value altogether as seen in the Request Headers below:

I have read through some of the previous posts but none of them had a solution.
Has anyone been through this and had a proper solution? Thanks.
Exposing OAuth2 clients to scripting is something we're planning to implement in the future but isn't available right now.
OAuth2-based SMTP profiles are the only thing that use the configured OAuth2 clients.
Hi Kev,
That's what I figured out after further reading through the manual. This will be a much sought after addition I believe.
Dear All,
For anyone going through this path, here's what I did:
Stuffed all parameters into the header, created a HttpClient and did a post:

response.statusCode gives the status code and
response.test gives the returned string, like so:

Cheers.
2 Likes
Hi Kevin,
is there any ETA on this?
Is this even in the pipeline yet?
I was really excited to see the configuration page for OAuth2.0 because I had to manually deal with this in the past, just to be hit by the reality that it wasn't included as a proper scripting interface.
Thank you very much!
There isn't a firm timeline associated with this ticket. My guess is it will happen sometime in the 8.3 lifetime.
Sorry to resurrect an old topic, but has there been any more progress on bringing this into scripting for 8.3? This is such a headache comparatively from a maintenance standpoint.
No change 
Best case is this makes it into the 2027.2 release, but looking at the ticket I don't think it's even on the list.
The best way to register your interest is via a support ticket.