This topic was automatically generated from Slack. You can find the original thread here.
Hi !
I’m trying to connect a Pipedream account to GoHighLevel using Oauth. The basic auth is pretty simple and it works out of the box.
However I noticied that some endpoints need additional scopes permissions.
I have created a custom Oauth client in Pipedream with the necessary scopes. I also created an app in GoHighLevel with the right permissions. The app is installed on the GoHighLevel env.
I am currently trying to get the contacts in my GHL env using the endpoint: “https://services.leadconnectorhq.com/contacts/”
Here is my code:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
highlevel_oauth: {
type: "app",
app: "highlevel_oauth",
}
},
async run({steps, $}) {
const auth = this.highlevel_oauth.$auth;
return await axios($, {
url: "https://services.leadconnectorhq.com/contacts/",
headers: {
Authorization: `Bearer ${auth.oauth_access_token}`,
"Version": `2021-07-28`,
},
})
},
})
I am facing this issue:
AxiosError - Request failed with status code 401
{
"message": "This authClass type is not allowed to access this scope. Please reach out to the Platform team to get it added.",
"error": "Unauthorized",
"statusCode": 401
}
Please find below the scopes that I used in the scope configuration.
Do you guys have any idea how to fix this ?
Thanks