I am trying to set up the GET request node but I am having some trouble. Can anyone point me in the right direction? I am trying to draw data from here The Ambassador Platform API (2.0).
Here is my workflow and I’m guessing I’m having issues with the JSOn to Table because no data is being passed?
@Daniel_Weikert is right here. The bearer needs to be provided although according to the documentation they expects lower case (in most cases it’s Bearer).
What’s more important is that the id is a mandatory parameter in the query. You don’t have this at the moment
/v2/public/users/prospects
vs /v2/public/users/prospects/{id}
Do I still need to keep my username & password in the Authentication tab? 1|656x500
@ArjenEX For the GET url, do I just select from the list of urls available depending on what I’m trying to retrieve? So if I want to get all the details for prospects, I use the “Get prospects” url (https://public-api.theambassadorplatform.com/v2/public/users/prospects) from the documentation? And if I want all available information possible then I would have several GET request nodes with different links?
Is the bearer token just my API Key? I have now added bearer followed by a space and my API key.
now when I try to run it, it is now green but I’m getting a 401 error. I’ve checked my username and password in the Authentication tab and it’s correct.
Have a close look at the documentation. In order to get the token/bearer, you need to call https://public-api.theambassadorplatform.com/v2/public/auth/login and provide your API key, crm_name and email there. This needs to be in a JSON. It will then return a token.
You then need to pass this token along to call GET prospects (I didn’t notice the difference between prospects and prospect first). Since your authentication is within the bearer, you don’t need to provide your username and password again.
What you have as Request Header is good with the exception that you need to put the earlier retrieved token there. Easiest is to create the full string in String Manipulation node (you can use something like join("bearear ",$token$) and then parse it as flow variable to GET node.