I've confirmed the enablement of the Beta feature in the User Interface configuration screen.
I'm making a request for the OAS using this command:
curl -vvv -H "Content-Type: text/plain" -d '{"resources" : ["*"]}' https://redacted.develop.my.salesforce.com/services/data/v61.0/async/specifications/oas3- `v61.0` because the docs say to specify the latest version
- `-H "Content-Type: text/plain"` because I found another post saying it shouldn't be the default that curl sends, `Content-Type: application/x-www-form-urlencoded`
- `-vvv` shows `POST /services/data/v61.0/async/specifications/oas3 HTTP/2`
The response is:
[{"errorCode":"NOT_FOUND","message":"The requested resource does not exist"}]Using `v60.0` produces a different response:
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]I don't know what more to try. Does the request require an `Authorization` header?
1 réponse
Yes, your client must have been previously authenticated with your org and the OAS request include an Authorization header.
Here is a blog I co-authored showing how to authenticate to Salesforce using the OAuth Client Credentials flow.