Solved! Go to Solution.
Hi @aashay511 , see if the attached works for you once you put in your info in the text input tool (namely client ID, client secret, username and password columns).
The hardest part is usually the Authorization header. You have to combine your client id and secret with a : in the middle, and then base64 encode them. I'm using the blob tools to base64 encode (currently more accurate than the base64 tool). Then you put "Basic " (with a space) in front of your base64 encoded client ID:Client Secret.
To break down all the parts of the API Call and where they go:
API documentation:
POST https://login.eloqua.com/auth/oauth2/token
Authorization: Basic Q09NUEFOWVhcdXNlcjE6cGFzc3dvcmQxMjM=
{
"grant_type":"password",
"scope":"full",
"username":"testsite\\testuser",
"password":"user123"
}
POST : This is the HTTP action listed on the payload tab:
https://login.eloqua.com/auth/oauth2/token : This is the url in the text input that is then entered at the top of the basic tab:
Authorization: Basic Q09NUEFOWVhcdXNlcjE6cGFzc3dvcmQxMjM= This is a header called Authorization. Basic is the type of auth, and that long string is the base64 encoded client ID:Client Secret.
{
"grant_type":"password",
"scope":"full",
"username":"testsite\\testuser",
"password":"user123"
}
These are payload items that I've entered into the text input tool and then check on the payload tab. Scope isn't required, so I left it off.
Let me know if you have any questions!
Thank you very much for your response.
I tried executing your workflow after I input the details required (client ID, client secret, username, and password columns).
However, I got the following as a response:
@aashay511 bummer! My first guess is that there is still something not quite right about the Authorization header. I admittedly know very little about postman, but I believe you should be able to have it show you what the base64 encoded authorization header that's sending is. I clicked on the code icon on the right and then selected curl:
So postman is converting my client id of abc and client secret def to YWJjOmRlZg== . I checked and alteryx is doing the same:
I'm curious if it matches for you?
If the Authorization is matching, then I would check all of the other pieces in alteryx compared to postman:
I was able to solve this issue using the basic authentication method which seems to work fine. Will further test for the OAuth 2.0 method and see if that works.
Thanks for your help!