Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

API connection Noobie

Discussion in 'Unity Analytics' started by kaihcheung, Jul 30, 2019.

?

API

  1. Coding

    0 vote(s)
    0.0%
  2. Coding

    0 vote(s)
    0.0%
  1. kaihcheung

    kaihcheung

    Joined:
    Jul 30, 2019
    Posts:
    1
    Im using python and i wanted to know why this is not correct?

    i think my parameters are wrong but could someone point me to the right direction?

    import requests

    params = {
    'start': '{2019-07-01T00:00:00.000Z}',
    'end': '{2019-07-02T00:00:00.000Z}'
    }

    Organizations = 'asdad'
    Organization_ID='asdasdasdas'
    APIkey='asdasdadasdasda'



    request_url = 'https://stats.unityads.unity3d.com/{}/:{}/reports/acquisitions?splitBy=campaignSet,country&fields=timestamp,campaignSet,country,clicks,installs,spend&apikey={}'.format(Organizations,Organization_ID,APIkey)

    res = requests.request('GET', request_url, params=params)

    res.status_code
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,439
unityunity