In our company, we are accessing the Swagger UI from our sandbox and production Alteryx Server webpage. We are able to authorize successfully using our API Access Key and Secret on both.
However, when we try to execute any endpoint (Get/v3/users, Get/v3/workflows etc.), we keep getting a 401 Unauthorized error.
We are Curators, have set rights to API Access, and have set up Alteryx Server, but we are not part of the IT department.
Are there any server-side settings we might have missed? Or is there something IT needs to enable?
Solved! Go to Solution.
@Imaizumi As far as API responses correctly, Server setting itself should be no problem.
To use Server API, you need to start from Oauth2 session:
(1) Call '/webapi/oauth2/token' endpoint with your API key and secret to get temporary token.
(2) Send the given token for authorization of API call such as /v3/users, so on. (It's usually like 'Bearer ******')
If the above statements is not addressing your concern/query, let me know.
@Imaizumi There is a chance IT has to open up the FW ports from your machine or the gallery machine to the Alteryx Server endpoints. I am not sure about your security controls within the org but at my last role, we had to open up the access from the machines to the API endpoint.
Bacon
I can use the Swagger Oauth2 session authorization. So that should be good, correct?
Once this is done and I try execute in Swagger that is where I get error 401.
In the curl respond I can see that the Bearer key is generated.
If I try to make a workflow in Alteryx using mycompanyserver.com/webapi/v3/users and Bearer token then I get error HTTP/1.1 401 Unauthorized
If I try the macro from Alteryx Server v3 API endpoints I then get "A bearer token was not received from the Gallery API authentication attempt!"
So as @abacon said, maybe the issue is with our IT department and if FW ports are open or not?
I will check it out.