We are fetching the events data using the Seatgeek events API.
We want to integrate Checkout process on our website.
Getting the Information Necessary to Render a Checkout Form
GET /listings/{listing_id}?event_id=123&quantity=1&country=US&state=NY
We are trying the render the checkout page using the above API. Can you guide us how to fetch the listing id for a event ? We cannot get it from the events api.
When we try to authenticate the API using below method
The authentication code can be calculated as such, where client_secret is the SeatGeek API client secret that corresponds to the passed client id:
Hi,
We are fetching the events data using the Seatgeek events API.
We want to integrate Checkout process on our website.
Getting the Information Necessary to Render a Checkout Form GET /listings/{listing_id}?event_id=123&quantity=1&country=US&state=NY
We are trying the render the checkout page using the above API. Can you guide us how to fetch the listing id for a event ? We cannot get it from the events api.
When we try to authenticate the API using below method The authentication code can be calculated as such, where client_secret is the SeatGeek API client secret that corresponds to the passed client id:
Our Code const Checkout = ({ match }) => { const eventid = match.params.eventid; const [ events, setEvents ] = useState(null); const body=""; const hmacDigest = Base64.stringify(hmacSHA1( client_secret,"POST" + "\n/" + match.url + "\n" + body)); console.log(hmacDigest); useEffect(() => { const fetchPrismicData = async () => { try { const eventsDoc = await fetch("https://api.seatgeek.com/2/listings/123456?event_id="+eventid,{ method: 'POST', headers: { 'Authorization': 'SG '+client_id+':'+hmacDigest, 'Access-Control-Allow-Origin':'*' } }) .then(res => res.json().then(events => setEvents(events)));
We get an 403 unauthrorized error as a response.
Regards,