Search Unity

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:
    4,914