Hello Everyone,
I created an access token in the atlassian web application and it works when I use curl like this:
curl --user "petar.dimovski@etxcapital.com:TOKEN https://etxcapital.atlassian.net/wiki/rest/api/content&type=page
but when I ping the api from a python script I get the following response:
{"message":"Current user not permitted to use Confluence","statusCode":403}What should I do in order to make it work like curl does?
Here's the python script:
import os
import requests
from requests.auth import HTTPBasicAuth
confluence_api_url ="https://etxcapital.atlassian.net/wiki/rest/api"
def get_auth_details():
return HTTPBasicAuth(os.getenv("username"), os.getenv('token'))
def get_pages(label=None):
params = {
'type':'page',
# 'start':0,
# 'limit':500
}
if label:
params["label"] = label
resp = requests.get(f"{confluence_api_url}/content/search.json",
auth=get_auth_details(),
params=params)
return resp.json()
We resolved this by discovering this is happening because the first two characters match the first two characters of the SYLK file format which is ID.
To fix this, open the file in Notepad and modify ID to be anything else. The easiest way is to add another character. Save and close Notepad. Then it should open in Excel correctly.
Hi James,
Thank you for reaching out to Atlassian Community!
The CSV type should work with Excel or Google Sheets.
Can you please open the file directly on Excel menu instead of clicking on the file to open?
If possible, send us a screenshot of the error that you see when trying to open the file.
Regards,
Angélica
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.