HighLevel API returns 401
The token is not authorized for this scope HighLevel medias upload-file1What happened
We post social content for a business through the HighLevel API, using a Private Integration token. The exact message: The token is not authorized for this scope.
Every call to POST /medias/upload-file and to the social planner account calls came back 401: "The token is not authorized for this scope."
An upload tried with a session header instead returned 400 ALT_ID_REQUIRED.
The cause: a Private Integration token only gets the scopes ticked when it was made. Ours had 11 (conversations, contacts, Conversation AI, knowledge base). None covered media or the social planner.
What did not work: adding altId and altType=location to the query and the form. That answers the 400. The 401 stayed because the scope was still missing.
2What we did
In the location, open Settings, then Private Integrations, then the integration.
Open the three-dot menu, click Edit, then Next to reach Scopes.
Add medias.readonly, medias.write, socialplanner/account.readonly, socialplanner/post.readonly and socialplanner/post.write. Click Update.
Editing scopes keeps the same token. Do not click Rotate, which issues a new one and breaks everything using the old one.
In the scope search box, backspace deletes the last tag you added. Clear only the letters you typed.
Tip: the social post call takes accountIds and userId, not userIds. HighLevel explains token scopes in HighLevel private integration tokens. The HighLevel API docs cover the API this page uses. The OWASP authentication guide covers sign in and retry limits.
3How we know it worked
On Fri Oct 23, after a reload, the scope list showed 16 saved and the token value had not changed. With that token we read 6 social accounts, uploaded an image, and scheduled a post on Facebook and Instagram. Both posts read back.
4What you can take from it
A 401 that names "scope" means the token is missing a permission. Fix the token's scopes before you change the call. Another 401 fix is in Supabase 401 errors. A third is the Twilio 401 fix. For safe key handling, see one time key links.
