Community Halloween is live until October 31st! Complete any 2 quick activities to earn the 2025 Community Halloween badge. Feeling brave? Check out the activities here
Start Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Can Authorize on Swagger, but get error 401 when executing

Imaizumi
8 - Asteroid

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?

4 REPLIES 4
gawa
16 - Nebula
16 - Nebula

@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.

abacon
13 - Pulsar

@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

Imaizumi
8 - Asteroid

I can use the Swagger Oauth2 session authorization. So that should be good, correct?

Imaizumi_0-1761008291073.png

 

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.

Imaizumi
8 - Asteroid

@gawa and @abacon 
Thank you very much for trying to help. We figured out the problem. We went over our settings and reapplied the Curator role for my account, that solved the issue.