====================================== GHL Agency — Create Subaccount + User ====================================== [1/3] Creating sub-account: My New Subaccount ... --- REQUEST --- Method : POST URL : https://services.leadconnectorhq.com/locations/ Payload : { "name": "My New Subaccount", "phone": "+923250999800", "email": "farazalibutt12345@gmail.com", "address": "123 Main Street", "city": "New York", "state": "NY", "country": "US", "postalCode": "10001", "website": "https:\/\/example.com", "timezone": "America\/New_York", "companyId": "NkqKT3VbWDGhVBCkwaYW" } --------------- --- RESPONSE (HTTP 201) --- {"id":"BWYgY1hviyAzwEoRlUHQ","brandId":"f4kU9OebRDLeVhfVwp8r","companyId":"NkqKT3VbWDGhVBCkwaYW","name":"My New Subaccount","address":"123 Main Street","city":"New York","state":"NY","country":"US","postalCode":"10001","website":"https://example.com","timezone":"America/New_York","email":"farazalibutt12345@gmail.com","phone":"+923250999800","logoUrl":"","business":{"name":"My New Subaccount","address":"123 Main Street","city":"New York","state":"NY","country":"US","postalCode":"10001","website":"https://example.com","timezone":"America/New_York","email":"farazalibutt12345@gmail.com"},"social":{"facebookUrl":"","googlePlus":"","linkedIn":"","foursquare":"","twitter":"","yelp":"","instagram":"","youtube":"","pinterest":"","blogRss":"","googlePlacesId":""},"settings":{"allowDuplicateContact":false,"allowDuplicateCompany":false,"allowDuplicateOpportunity":false,"allowFacebookNameMerge":false,"disableContactTimezone":false,"contactUniqueIdentifiers":["email","phone"]},"dateAdded":"2026-08-05T05:39:16.557Z","domain":"","currency":"","isAgencySubAccount":false,"defaultEmailService":"","permissions":{},"snapshotId":"","traceId":"16f4e301-094d-45bd-8db5-ad1c66462b33"} -------------------------------- ✓ Sub-account created. Location ID: BWYgY1hviyAzwEoRlUHQ [2/3] Getting location-level access token ... --- REQUEST --- Method : POST URL : https://services.leadconnectorhq.com/oauth/locationToken Payload : { "companyId": "NkqKT3VbWDGhVBCkwaYW", "locationId": "BWYgY1hviyAzwEoRlUHQ" } --------------- --- RESPONSE (HTTP 401) --- {"statusCode":401,"message":"The token is not authorized for this scope."} -------------------------------- ❌ Error: Failed to get location token (HTTP 401): The token is not authorized for this scope.