
s7d2w (s7d2w) asked a question.
I am trying to use the REST api on Confluence with Okta. I have a perl script which uses the technique found at https://developer.okta.com/blog/2018/06/22/multi-factor-authentication-command-line and seems to work mostly. I am getting a sessionToken and a sessionId and all of the appropriate cookies are set for my XXX.okta.com. Then I make my request to confluence and I see a series of redirects that looks correct.
- https://${CONFLUENCE}/rest/api/content?type=page&spaceKey=${SPACE}&title=${TITLE}&expand=body.storage%2Cversion
- https://${ORGPREFIX}.okta.com/oauth2/default/v1/authorize?...
- https://${CONFLUENCE}/oauth2/idpresponse?...
- https://${CONFLUENCE}/rest/api/content?type=page&spaceKey=${SPACE}&title=${TITLE}&expand=body.storage%2Cversion
Unfortunately the result comes back as a 404 with this content:
{
"statusCode": 404,
"data": {
"authorized": false,
"valid": true,
"allowedInReadOnlyMode": true,
"errors": [],
"successful": false
},
"message": "No space with key : ${SPACE}",
"reason": "Not Found"
}
Am I missing a step?

In order to provide you with the best answer, we need to gather more information. Please open a ticket with the support team, via the Open a Case button on the Okta Help Center (https://support.okta.com/help), and provide us with your workflow, such as the request you are trying to make, and the expected answer.
The request I am trying to make is in the question above. The result I expect is to not get an error. I was very clear in my explanation.