How to get oauth access token

this my code
const respone = await $request.invokeTemplate(“oauthValidation”, {});
}catch (error){
console.log(‘post oauth validation error’, error);

this my requests.json
“oauthValidation”: {
“schema”: {
“protocol”: “https”,
“method”: “POST”,
“host”: “”,
“path”: “/services/oauth2/userinfo?access_token=<%= access_token %>”
“options”: {
“isOAuth”: true

i have a local stroe access_ tocken but not working facing 400 this error

how i will fix this issue?

Hey @Arjunan_G,

Welcome to the Freshworks Developer Community! :tada:

At this moment, access_token substitution in Request Method is only supported in Headers.Authorization alone. From the schema, I see that access_token is used in the path as a query parameter.

You can refer to Request Method docs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.