I am trying to post to GHL Social Planner via the API using a sub-account Private Integration Token with socialplanner/post.write and socialplanner/account.readonly scopes. Every API call returns {“statusCode”:401,“message”:“Invalid JWT”} regardless of whether I use Bearer prefix or not. The token is approximately 40 characters long starting with pit_.
Endpoint: https://services.leadconnectorhq.com/social-media-posting/LOCATION_ID/accounts
Has anyone successfully authenticated with a sub-account PIT token against the Social Planner API? Is there a different authentication method required?
Hello,
The endpoint you’re calling is a GET endpoint, check if you are sending correct type because that’s often common is you are dealing with multiple requests.
Error can be caused by a missing Version header. GHL API v2 requires it on every call:
Authorization: Bearer pit_xxxx...
Version: 2023-02-21
Without it, you’ll get an error even with a perfectly valid token. Try adding it and see if that resolves the authentication issue first.
If that does not help – can you show us your config? Of course blur any sensitive data first!
Have a nice day,
Michal