I'm trying to call REST API to display a push message that is sent from Marketing Cloud in landing page.
How do I call the API? I was able to get the Token using the client secret and ID but how to pass the token to the REST push message call.
How to pass the Authorization : Bearer TOKEN to the httpget call?
%%[
VAR @httppost,@apiid,@apistatusCode,@apiresponse,@apitoken
SET @apiid = '{"clientId": "xxxxxxxxxxxx","clientSecret": "xxxxxxxxx"}'
SET @httppost = HTTPPost2("https://auth.exacttargetapis.com/v1/requestToken","application/json",@apiid,false,@apistatusCode,@apiresponse)
SET @apitoken = Substring(@apistatusCode,17,24)
VAR @httpgetmessage, @apiid,@apistatusCode2,@apiresponsemessage
SET @httppostmessage = HTTPGet("https://auth.exacttargetapis.com/v1/message/xxxxxxxx", headers = {"Authorization":"Bearer " + @apitoken,@apiresponsemessage})
%%=(@apitoken)=%% // This is printing my response token from the rest call
]%%