Call on a curl command with a function [Photon]

i reckon i need to put the token i get from spotify somewhere. Should i translate the curl command into json? and should i remove the few lines of json that is there as standar?