     if params.otp?
       opts.headers['X-GitHub-OTP'] = params.otp
     data = {
-      #"client_secret": @client_secret,
-      #"scopes": [
-      #  "public_repo" #To fill up
-      #],
-      "note": "aTox github binding"
+      "note": "aTox github binding",
+      "note_url": "https://github.com/EEnginE/atox"
     }
     @sendRequest {opts: opts, data: data}, (data) =>
       console.log data
       console.log JSON.parse(data)
-      @setToken JSON.parse(data).token
+      @setToken JSON.parse(data).id JSON.parse(data).token
       callback()
 
   createAppToken: (params, callback) ->

      console.error e

  getToken: ->
    @htoken

  setToken: (token) ->
    @htoken = token

  authentificate: (params) =>
    console.log "authentificate called"

      opts.headers['X-GitHub-OTP'] = params.otp
    data = {
      "client_secret": @client_secret,
      "scopes": [],
      "note": "aTox github binding",
      "note_url": "https://github.com/EEnginE/atox"
    }
    @sendRequest {opts: opts, data: data}, (data) =>
      parsedData = JSON.parse(data)
      console.log parsedData
      @setToken parsedData.id parsedData.token
      callback({id: parsedData.id, token: parsedData.token, data: parsedData})

  request: (params, callback) ->
    #params.path, params.method, callback
    if @htoken.token is ''
      return
    if not params.path?
      return
    if not params.method?
      params.method = 'GET'
    opts = {
      hostname: 'api.github.com',
      port: 443,
      path: params.path,
      method: params.method,
      headers: {
        'User-Agent': 'aTox Github Binding v0.0.1',
        'Content-Type': 'application/json; charset=utf-8',
        'Authorization': "token " + @htoken.token,
        'Accept': 'application/vnd.github.v3+json'
      }
    }
    data = {
      "note": "aTox github binding",
      "note_url": "https://github.com/EEnginE/atox"
    }
    @sendRequest {opts: opts, data: data}, (data) =>
      parsedData = JSON.parse(data)
      console.log parsedData
      callback(parsedData)

  sendRequest: (params, callback) ->
    #params.opts, params.data, callback
