I am having an issue with authorizing api keys. No matter how I enter it in the credentials area, I am getting 404 “Authorization is required!”
I am trying to get data from Pretix, an event ticketing software. So the goal on my end is to get Pretix customer data such as Name, Email, Address etc. Whenever I do not use API keys, it gives me post body such as this
Pretix doesnt pass sensitive information over to webhooks with info such as Name, Email etc unless I am using API token. So my conclusion would be to use API token.
I’ve entered the API token as a Header Auth with the following information:
according to the documentation of pretix, the header name is Authorization and not Authentication. By the way this applies to nearly every rest-based api.
Thanks for the update and support. I actually made an error by mentioning Authentication, it was actually Authorization and not what I mentioned. I was getting the same results mentioned. Do I copy and paste this
Just did some testing for a few hours and I realize that none of the authorization commands work at all when using it in the webhook node. I tried all different kinds of settings and the only way I got it to work was to enter it in the HTTP Node instead as the saved configured credentials with the name “Authorization” and the value “Token API_TOKEN_HERE”
or manually entering it the “send headers” field with the following:
Name: Authorization
Value: Token API_TOKEN_HERE
Not sure if its a bug with the Webhook, but nothing works for me with api. I end up having to pull/requested it from the http node instead.
Another question/issue I have now is this. So I was able to figure out setting the Pretix API with a webhook and was able to get all customer information by using Token API for authentication. At the last step of a http request node, it sends the customer data to Acelle Mail software and adds them to the mailing list successfully.
I have a question in regards to getting consistent data. Everything is connecting great so far, and I am able to get the orders for an event with the following API End point
What I am doing is getting the following customer data:
Node 1
• Name
• Address
• City
• State
• Zipcode
Node 2
• Ticket Type
The nodes combine and get all of the data mentioned from customers. My only issue now is every time I call this endpoint, ALL orders show up in the scheme/tables and it seems impractical as the data exports all orders instead of a recent one. Each order has has its own order ID, so if I enter no order ID, it will only copy specific data for a single customer order that I entered as JSON. I am trying to capture all of the data above every time that a new order comes in, to then automatically add each correct attendee information to the mailing list with the correct data of that customer.
For example, this is what is currently happening.
Order ID 1 is
John Doe
111 Address Avenue
New York
NY
11111
Order ID 2 is
Jane Doe
1245 Address Avenue
Chicago
IL
92938
If I enter the json variable {{ $json.results[1].positions[0].attendee_name }} - It will equal to John Doe. When it runs the webhook it will snatch this same exact customer (John Doe) each time and add them to the mailing list because im using the same json with the results being "“json.results[1]” in that json code, which signifies order ID1
Is there a specific endpoint, specific variables or a specific configuration required for me to do this correctly? Am I using the wrong approach? Here are screenshots
Hi @webmaster101, from looking at your screenshot it appears you only have a single n8n item, with the actual results living inside the results field. So you probably want to use the Item Lists node here to split out your results field like so:
Afterwards, you can work with each result individually (as subsequent n8n nodes will run for each item they receive) using an expression like {{ $json.positions[0].attendee_name }}:
Thanks for the update and thorough response. I was able to get this to work even the way I set it up before, but I am going the route you mentioned as I trust your judgement. The only thing is how do I get each submission separate one by one that comes in?
For example
{{ $json.results[0].email }}
The zero would be the customer email for order 1. What would be the correct setup to consequently get the data and put all of the information together of the customer order to prepare to be subscribe to the mailing list software? I am just lost on the part of consequential data capturing.
Here is the process:
Customer buys ticket in pretix
n8n connects to pretix, gets the data and captures Email, name, address, city etc. of each order
n8n matches the data for the ALL json results labeled 23 for reach section such as Name, Address, city, state etc. Note: The json result “23” is the 23rd customer ticket order. Pretix identifies all fields with the same number
Example
{{ $json.results[23].name }}
{{ $json.results[23].address }}
{{ $json.results[23].city}}
Organize the data and sign up customer to the mailing software with api with all the information mentioned.
The issue is, i cant use {{ $json.results[*].email }} for it to capture each one. How would the system know to get them in order by result 23, result 24, result 25 and etc to sign them up to the mailing list software? Do I need to setup a variable configuration or a specific node to make consequential data exports?
I still cannot get the saved API credentials to work by saving it and using it in HTTP Request. Still gives me authentication wrong. The only way it works is if I manually enter it when I enabled “Specify headers” as
Authorization
value: Token APIHERE
Credential setup isn’t working. I am on the latest n8n.