Skip to main content

Developer Challenge 2023| Scavenger Hunt!

  • December 18, 2023
  • 3 replies
  • 373 views
Developer Challenge 2023| Scavenger Hunt!
Brian Turcotte
Forum|alt.badge.img+37

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 States,Β CanadaΒ (with the exception of Quebec),Β Australia,Β India (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 Profiles.Β You 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!)

    Hint:Β Take 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

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+3
  • Problem Solver I
  • December 19, 2023

Β 


DavidSandel
Partner - Silver
Forum|alt.badge.img+21
  • Partner - Silver
  • December 19, 2023

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


DavidSandel
Partner - Silver
Forum|alt.badge.img+21
  • Partner - Silver
  • January 24, 2024

So, who’s the big winner?