Common Flows

Step-by-step walkthroughs for our most popular API use cases

  1. Display POAPs in your application

You can easily fetch and display a user’s POAPs and have them available in your application for any use case.

Prerequisites:

  • An API Key for POAP’s API. Apply for one here.

Flow: To display POAPs in your application, you can use GET /actions/scan/{address} where address reflects the public wallet of the user you are trying to display the POAPs for.

Results: If a user logs in to your application using their Ethereum wallet, (regardless of how they log in) that has any POAPs, you will be able to display their POAPs.



  1. Token Gating using POAPs

By leveraging POAP, you can implement token gating using POAPs by specific Event ID. This allows users with a specific POAP from a specific event to access an app.

Prerequisites:

  • An API Key for POAP’s API. Apply for one here.
  • An Auth0 token to receive a Bearer token. Apply using the same link here.
  • A POAP event ID.

Option 1:
You can also use GET /actions/scan/{address}/{eventid} to see if a specific address has a POAP for that specific event ID. Using this endpoint is generally faster.

Results: If a user has logged in with their Ethereum wallet that has a POAP from POAP event ID specified, the log-in will continue.

Option 2:
To create token gating, you can scan to get all the tokens for that address and see if the user has a token for the specific event ID. GET /actions/scan/{address}

Results: If a user has logged in with their Ethereum wallet that has a POAP from POAP event ID specified, the log-in will continue.


Option 3:
To create token gating, we encourage using GET /event/{id}/poaps endpoint to consume data from POAP API. This endpoint offers all the wallet addresses that hold a specific Event_ID.

Results: If a user has logged in with their Ethereum wallet that has a POAP from POAP event ID specified, the log-in will continue.


  1. Creating an event programmatically using API

You can programmatically create event petitions using the API

Prerequisites:

  • An API Key for POAP’s API. Apply for one here.
  • An Auth0 token to receive a Bearer token. Apply using the same link here.
  • Details of your event

Flow:
Create an event using POST /event by providing the details of the event you’d like to create.

Our Curation Body review can take up to 24 hours. If this time has elapsed and you’d like to check if your petition has been reviewed. Use GET /redeem-requests/active/count and if you receive:

  • Response 1 - review process is still active (if the 24-hour timeframe has elapsed, we suggest engaging the Curation Body on Discourse.)
  • Response 0 - review complete

Additional considerations:

  • If the review was positive, you can request mint links (mint links are also sent via email in a .txt file)
  • To access your mint links, use POST /event/{id}/qr-codes


  1. Minting function, for a more seamless experience for your collectors

Prerequisites:

  • An API Key for POAP’s API. Apply for one here.
  • An Auth0 token to receive a Bearer token. Apply using the same link here.
  • Mint links to your event
  • Wallet ID where you'd like to mint the POAP to
  • "Secret" from the POAP server.

Flow:
You’ll need the “secret” to be able to mint the POAP to a wallet ID (secret signifies eligibility and access to mint).

Additional considerations:

  • In case you need to request extra codes, use this endpoint POST /redeem-requests

  • To make changes to event details using POAPs front end, please use your Edit code provided via email (email confirmation when the event was created)


Did this page help you?