Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

OAuth ApiUser has to be MachineName?

Started by Sample Cellar -   in API Authentication

We are developing a Windows application with Xero Public application type and its working fine with multiple runs, once the token expires(30min) it will prompt ask for 6or7digit code.But when i'm trying to run the application in different machine it tries to authorize even though it has validity. I'm having a config file where is used to save consumerkey,secretkey,Tokenkey,tokensecurity,machinename and expiresat. Each time when the application runs it used to make connection with the above keys.

In here when i try to establish connection through xeroapi I'm adding a line of code which is in below.

var user = new ApiUser { Name = "The users name" };

I'm using Environment,Machine name

What is the purpose of the above code? Instead of taking machinename can i use some static name?