Agency Level In New Oauth API
under review
S
Scott Heliker
From my understanding the V1 API will be deprecated eventurally. Currently we and others use this to automate insertion of API keys after a new account is created. We are not able to do this with the Oauth unless we can pass in and Agency API key when authorizing which then would allow us to populate a RPC with all the sub account under that Agency which then would allow us to map in the API keys in situations where we need things to happen dynamically.
Example. Creaeting a new sub acount and loading a snapshot thru the API then taking that response from the newly created account to update the custom values on that account. We can't do this without dynamically passing the API key from the new account to the update custom values endpoint dynamically.
There are a few othe instances we ourselves and I know many others use so I hope they consider and alternative with the Oauth by allowing us to pass in our Agency API keys so we have the option to make an Agency connection to then dynamically pass in locations we want to make the API call to.
Log In
R
Remi Mayer
GoHighLevel White-Label OAuth Authentication Issue
## Problem
Users logged into a white-labeled domain (app.maxout.ai) are forced to log in again when accessing the OAuth consent screen on marketplace.leadconnectorhq.com, breaking the expected single sign-on experience.
## Technical Details
- White-label domain: app.maxout.ai
- Main GHL domain: app.leadconnectorhq.com
- OAuth endpoint: marketplace.leadconnectorhq.com
## Authentication Flow Issue
- User logs into white-label domain (app.maxout.ai)
- Authentication cookie (m_a) is set for app.maxout.ai domain
- OAuth flow initiated via:
```javascript
client_id=${clientId}&
redirect_uri=${redirectUri}&
response_type=code&
scope=${scopes}&
state=${encodeURIComponent(JSON.stringify(state))}&
loginWindowOpenMode=self`
);
```
- User redirected to OAuth consent screen with message:
> "Please login to your CRM to continue"
> "Note: If you are already logged in, please logout and login again."
## Root Cause
Cross-domain cookie restrictions prevent the OAuth endpoint from accessing the white-label authentication cookie:
- White-label auth cookie: Domain .maxout.ai
- Marketplace requires: Domain .leadconnectorhq.com
## Attempted Solutions
- Using marketplace.leadconnectorhq.com instead of marketplace.gohighlevel.com
- Adding loginWindowOpenMode=self parameter
- Attempting iframe approach to maintain authentication context
## Expected Behavior
Authentication state should persist from white-label domain to marketplace without requiring additional login.
## Questions for Support
- Is there a recommended approach for OAuth with white-label domains?
- How should authentication cookies be shared between domains?
- Are there specific white-label OAuth configuration settings?
- Should additional parameters be included in OAuth requests?
## Request
Guidance on properly implementing OAuth flow while maintaining white-label authentication context to eliminate double login requirement.
B
Bret Dunlap
Does any one know how to create a connection with the GHL Oauth 2 I can do it with the http Oauth 2 but cant seam to get the GHL module to connect
Core Platform
under review
A
Automation YouEarn
Core Platform: This could likely be addressed by allowing a flag to be set on the OAuth request payload 'GetAccessCodebodyDto' to allow all locations to be set instead of having an explicit list of locations defined, so that when we select all it means 'all' and not 'all of the currently available'.
The consequent of the current design is that if we add a new location after we have generated our token and selected all Locations it is returning a defined list at the time of generation via 'approvedLocations' in the 'GetAccessCodeSuccessfulResponseDto' response, this caused the 'https://services.leadconnectorhq.com
/oauth/locationToken' calls to fail with any new location after the authentication was setup.
A
Automation YouEarn
Core Platform is there any update on whether this functionality is/was accepted into the roadmap?
R
Remi Mayer
Core Platform any update on this?
E
Ed Preble
Would also like ability to create Snapshots using Oauth
A
Anthony CRM Admin
Please vote for my request: https://ideas.gohighlevel.com/apis/p/agency-level-api. Eventually, I think a few of these posts will be merged.
G
Georgi Anastasov
Yes, this is the main reason we are still using the V1 API.
However keep in mind that OAuth has a completely different philosophy for authentication (User comes first) and provides limitations based on scopes, It might be possible to create a location trough the API, but it would be impossible to fully utilize it before a user authenticates with your app/platform/integration
A
Anthony CRM Admin
Georgi Anastasov: Please vote for my request: https://ideas.gohighlevel.com/apis/p/agency-level-api
G
Greg Hadley
It's frankly ridiculous to me that people paying $297 a month will lose access to an API we used to have access to.
Doesn't make sense to me we won't have access to API 2.0.
S
Scott Heliker
Greg Hadley: They are supposed to come up with a solution for all the endpoints in V1 to be available in V2 before deprecating it.