I receive device_token with Corona (in the same way as in the sample"GooglePushNotifications" example). How can I convert it to Urban Airship’s APID?
I tried this code (from one of the posts here):
[lua]
local function registerUrbanDevice(deviceToken)
local secretString = mime.b64(APPKEY … “:” … APPLICATIONSECRET)
headers = {}
headers[“Authorization”] = "Basic " … secretString
headers[“Content-Type”] = “application/json”
body = “”
local params = {}
params.headers = headers
params.body = body
network.request( “https://go.urbanairship.com/api/device_tokens/” … deviceToken , “PUT”, urbanNetworkListener, params)
end
[/lua]
But I receive the Urban Airship response “bad request”.
