Previously we had confluence data center, with that I had created API token, and now in the new confluence cloud as well I have created new token, but while I am trying to access any page using get_page_by_id() it is giving error like this
def get( 537 self, 538 path: str, (...) 546 advanced_mode: bool = False, 547 ) -> T_resp_get: 548 """ 549 Get request based on the python-requests module. You can override headers, and also, get not json response
4113 response.raise_for_status() 4114 else: -> 4115 raise HTTPError(error_msg, response=response) HTTPError: Current user not permitted to use Confluence
Hey @Pai H_ Prahalada _EXTERN_ Embitel_ ,
Can you share how you've created an API token? Is it a personal one, service account one (or something else)?
Can you maybe check this example, and try following one of these methods to see if the things work then: https://community.atlassian.com/forums/Confluence-questions/Bulk-remove-users-from-confluence-users-xxxxx-group-as-user/qaa-p/3244910#M359049?
Cheers,
Tobi
I had created it with giving the scopes like read and write scope
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pai H_ Prahalada _EXTERN_ Embitel_
This error means your API token works, but the user account lacks permission to view the Confluence content.
Log into the browser with that exact account to confirm you can access the site, space, and page manually. Also, verify your script uses Cloud authentication (full email as username, API token as password) and includes the /wiki suffix in the base URL:
Confluence(url="https://your-site.atlassian.net/wiki", username="email@example.com", password="API_TOKEN", cloud=True)
When browser access works but the API fails, your organization admin needs to check for security policies restricting API token usage.
Best,
Arkadiusz🤠
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried with base URL and API token, then again I was getting this error, but now I tried with wiki and the one which you mentioned , then I was getting 401 unauthorized
Probably have to look up with API restriction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.