Developer Challenge 2023| Scavenger Hunt!

  • 18 December 2023
  • 3 replies
  • 295 views
Developer Challenge 2023| Scavenger Hunt!
Userlevel 7
Badge +36

Hi Developer Group!

We’re finally back with a special installment of the ($500 prize) Developer Challenge! 🏆💰❗

 

This month, we’re doing an API Scavenger Hunt, which will teach you to make API calls to a Klaviyo test account I’ve created specifically for this challenge.

 

After following all of the clues and retrieving the final “code word”, you’ll submit your answer by adding the final code word as a custom property to your profile in the test account!

 

Another fun part of this challenge is that everyone can start on their own time - it’s still a race (fastest time wins), but everyone’s timer will start individually when they choose to submit the first API call, and will end when they submit their last API call.

 

Therefore, you can start the challenge on the first day, or the last day, and you don’t have to worry about someone beating you to it. Everyone has a fair shot at getting the fastest time!

 

Contest open now (Dec. 18) to Friday Dec. 29, 2023 at 11:59 pm EST!
 

ATTENTION

Contest is open to legal residents of the contiguous United StatesCanada (with the exception of Quebec)AustraliaIndia (excluding the State of Tamilnadu), and the United Kingdom
 

See here for full Terms and Conditions

 

 

CHALLENGE INSTRUCTIONS:


This month’s Challenge is an API Scavenger Hunt.

 

I’ve created a set of private API keys for my test account that you’ll use to make different API calls. Each API key’s scope is limited to the permissions required for each individual step of the scavenger hunt. 

 

  • Examples use Postman, but you may use the testing platform of your choice

 

  

  1.  You’ll start by creating the start_timer event, using the Create Event endpoint.

    Since I can view the exact time each API call is made using our new API logs tool, we will use this event as your “starting gun” for this challenge:
     
    • Call the event, “start_timer” (Case sensitive):

       

    •  Make sure to clear the time value, so that the starting_time value is defaulted to when the request is received on my end:

       

    • Make sure to clear the _kx value as well:

       

    • VERY IMPORTANT Make sure to include your email address (and name and other information if wanted, but not required) in the attributes object, and clear other identifiers like phone number and id:

       

    • A new Event requires a property object, which you can leave as the default newKey:newValue
       

    • Finally, you may clear any other unused values and authenticate with the assigned API key, which is as follows:

      pk_0efdaca00cde418f2c7344097b602edfc7
       

 



This API call will create a profile for you in my test account, and will also start your individual timer.

 

 

  1. I’ve hidden the next clue in your profile as a custom property...can you find it? 

    You’ll need this private API Key with profile access: 
    pk_a123d81fa0389aebb3ff69767adb87f17b

    ATTENTION: You know your email, but not your Profile ID...that means you’ll have to use Get ProfilesYou must filter by your email address using the filter: equals(email,’[email address]’)


     

    If I see that you used Get Profiles WITHOUT FILTERING, you’ll be DISQUALIFIED! (since that means you’ll see others’ clues!)

    HintTake note of your Profile ID!
     
  2. I’m guessing you’ve found the clue, which means you’re wondering what to do with it...In order to find the first letter of the final code word, you’ll have to use the clue with our new Get Image API:

    Get Image
    Private key: pk_2d9e9bb1baa1eddc261995a1ce92a6e4b6

 

 

 

Clue #2 is expensive, so you’ll have to use my 100% OFF coupon
 

  1. See if you can find my 100% OFF Coupon #2 code using our new Get Coupons API:

    Get Coupons
    Private key: pk_79d6931e4d9a18142443e5e97eaa8519f7

     
  2. Once you’ve found the coupon code, you’ll need to use it with our Get Image API again, and you’ll receive the second letter of the final code word!

    Get Image
    Private key: pk_2d9e9bb1baa1eddc261995a1ce92a6e4b6

 

 

If you want Clue #3, you’ll have to ask for it...by creating a new Event!

 

  1. Create an event via our Create Event API called “clueplease”, using your email as the profile identifier. Make sure to follow all the same structure as Step 1, to ensure Klaviyo recognizes your event immediately (especially clearing the time value)!

    Private key: pk_0efdaca00cde418f2c7344097b602edfc7
    ​​​​
  2. If you’ve created the event successfully and named it clueplease like you were supposed to, your profile has now been marked with a new property called SecondClue!

    If you need help getting the property, I’d take another look at Step #2…
    Hint: Private key: pk_a123d81fa0389aebb3ff69767adb87f17b
     
  3. Once you have the property, I’m guessing you know the next step...use it in Get Images for the third letter of the final code word!

    Get Image
    Private key: pk_2d9e9bb1baa1eddc261995a1ce92a6e4b6

 

 

I don’t want to spoil the final code word by revealing how many letters remain, so I’m going to hide the last [x amount of] clues all in the same hiding place.


For the final clues, you’ll have to use the Get Account API, with my Account ID which is VCjjW5.

 

“But what’s the private key you’ve created for Read Account access?” ​​​​​​


Well, in order to keep you from jumping ahead, I actually snuck in another property value in your profile during the last step, called Step 5. The value of that property is the Private Key with Read Account access!

 

In other words: To get the Private Key you need to make the Get Account call, you’ll have to check your profile properties for a property called “Step 5”! Read through the previous steps if you need help making the required Get Profile(s) call! 

 

The final clue(s) are hidden in the response of a correct Get Account call. What are the final clues? You guessed it - they will be the Image IDs of the final letters of the code word!

Just to remind you:

Get Image
Private key: pk_2d9e9bb1baa1eddc261995a1ce92a6e4b6​​​​​​

 

 

Congratulations! You’ve made it so far, and if you’re reading this it means you’ve discovered the final code word!

 

To submit your entry and stop your timer, add the final code word as a custom property called “codeword” to your profile using Update Profile:

Private key: pk_822c4b325eb25cca2361db45a0dbeb89f5


You’ll need your Profile ID, which by now I hope you’ve discovered in the response of one of the above steps!
​​​

 

Thanks for playing!!!

 

Please feel free to reach out to me via email (brian.turcotte@klaviyo.com) with any questions, and I’ll announce the winner after the contest closes on Friday December 29, 2023 at 11:59 pm EST!

Best,
Brian


3 replies

Badge +1

 

Userlevel 5
Badge +18

If I don’t win, there’s an asterisk on this one….which, conveniently, I cannot explain why until it’s closed. :-p

Userlevel 5
Badge +18

So, who’s the big winner?

Reply