Alteryx Server Discussions

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

Unable to use API - Alteryx gallery 2022.3

Shashankr
5 - Atom

Hello,

 

I am trying to Get the questions for the given Alteryx Analytics App - The server is returning the below response

Status : 403 Forbidden

Body :

{
    "message": "Access denied."
}

 

Below are the steps I followed :

1) Got the token from {server}/webapi/oauth2/token

Shashankr_1-1683639622469.png

2) Using this token tried to make a GET call to {server}/webapi/v1/workflows/:appId/questions

The API call is throwing a forbidden error.

 

Please let me know if we are missing any step.

 

Thank you! 

3 REPLIES 3
KenL
Alteryx
Alteryx

Hi @Shashankr ,

 

Starting from Server 2022.1, the new Server Web API service now uses the OAuth2 method for authentication for all API endpoints. This means that API calls now require an API Access Key and Secret, rather than just the Access Token as in your screenshot.

 

Try making the same API call in the Server interactive API documentation using your API Access Key and Secret, which can be found under My ProfileKeys. See the attached image as an example. For more information on completing the API authentication, you can see this Help page: https://help.alteryx.com/20223/server/server-api-configuration-and-authorization

 

Thanks,

 

Ken L.

Customer Support Engineer
Alteryx, Inc.

Shashankr
5 - Atom

Hi Ken,

 

I also tried to run API's through swagger on {AlteryxServer}/webapi//swagger/ui/index#/

1) Entering the Client ID and Secret

Shashankr_0-1683782175188.png

2) After authenticating 

Shashankr_1-1683782244867.png

2) Now trying a GET API - to get questions from a workflow 

Shashankr_2-1683782446874.png

4) I have the required permission's to run this workflow from Gallery- As shown in the screenshot below - I just ran the workflow today

Shashankr_3-1683782758843.png

 

Please let me know if we are missing any steps to get successful API calls.

KenL
Alteryx
Alteryx

Hi @Shashankr ,

 

Could you please try adding your Server user to the same Subscription/Studio as the target workflow here, i.e., "Service Account uipathrobot's Studio"? Then, please try running the same API call again and see if it works for you.

 

Thanks,

Ken L.

Customer Support Engineer
Alteryx, Inc.