wishy Posted March 13, 2020 Share Posted March 13, 2020 -snip- Â Â Alexoune001 and Xiphoid 2 Link to comment Share on other sites More sharing options...
Xiphoid Posted March 13, 2020 Share Posted March 13, 2020 nice share ! i'm waiting others wishy 1 Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 http://prntscr.com/rg25vd   Help to enable api i need this D: <? $config['username'] = "MYACC AUTORIZATED";          // api username $config['pwd'] = "WHERE IS API PASSWORD?";             // api password $config['server'] = "MYIPSERVER";             // your game api server ip:port $config['pageSize'] = "20";             // amount of players per page $config['page'] = "0";                   // what page to show $config['sortDirection'] = "Descending";    // Descending or Ascending ?> Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 16 minutes ago, Celtos said: http://prntscr.com/rg25vd   Help to enable api i need this D: <? $config['username'] = "MYACC AUTORIZATED";          // api username $config['pwd'] = "WHERE IS API PASSWORD?";             // api password $config['server'] = "MYIPSERVER";             // your game api server ip:port $config['pageSize'] = "20";             // amount of players per page $config['page'] = "0";                   // what page to show $config['sortDirection'] = "Descending";    // Descending or Ascending ?> https://docs.freemmorpgmaker.com/api/v1/introduction/setup.html  create an account ingame, give it api access (Grant API Access in the link above)  use that account login + pwd  server = ip:port (example: 127.0.0.1:5400) Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 yes i dit this Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 be sure you https://docs.freemmorpgmaker.com/api/v1/introduction/setup.html#enable-the-api and restart the server Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 My API IP:  theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401  Its listen  CONFIG Quote {  "RouteAuthorization": {},  "Hosts": [   "http://localhost:5401"  ],  "Cors": [],  "DataProtectionKey": "THERE IS A BIG BIG SEQUENCIE OF CHARS...",  "Enabled": true,  "DebugMode": false,  "SeedMode": false,  "RefreshTokenLifetime": 15,  "ThrottlePolicy": {   "IpThrottling": true,   "IpWhitelist": [],   "IpRules": {},   "ClientThrottling": true,   "ClientWhitelist": [],   "ClientRules": {    "test": {     "PerSecond": 1,     "PerMinute": 10,     "PerHour": 0,     "PerDay": 0,     "PerWeek": 0    }   },   "EndpointThrottling": true,   "EndpointWhitelist": [],   "EndpointRules": {    "/api/oauth/token": {     "PerSecond": 1,     "PerMinute": 5,     "PerHour": 0,     "PerDay": 0,     "PerWeek": 0    }   },   "StackBlockedRequests": true,   "Rates": {    "Second": 1,    "Minute": 60   }  },  "FallbackClientKey": "test",  "RequestLogLevel": 128 }  Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 3 minutes ago, Celtos said: My API IP:  theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401  Its listen http://theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401/api/oauth/token should show: {"error":"grant_type_missing"}  but it shows: Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid. Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 How do I change the grant type? Â I get a little confused in the tutorial Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 In the Server/Resourcs/config/api.config.json make sure it has Hosts": [ Â Â Â Â "http://localhost:5401", Â Â Â Â "http://theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401" Â Â ], or Hosts": [ Â Â Â Â "http://localhost:5401", Â Â Â Â "http://104.41.13.150:5401" Â Â ], and "Enabled": true, Â Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 When i put external IP  get error Quote  "Hosts": [   "http://localhost:5401",   "http://104.41.13.150:5401"  ],  Quote 2020-03-13 23:43:38.345 [Error] Failed to start API. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: The format of the specified network name is invalid   at System.Net.HttpListener.AddAllPrefixes()   at System.Net.HttpListener.Start()   at Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func`2 appFunc, IList`1 addresses, IDictionary`2 capabilities, Func`2 loggerFactory)   at Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func`2 app, IDictionary`2 properties)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(IAppBuilder builder)   at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)   at Intersect.Server.Web.RestApi.RestApi.Start() in C:\TeamCity\buildAgent\work\40dc5d27074313da\Intersect.Server\Web\RestApi\RestApi.cs:line 74   Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 what about http://theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401 as host? Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 I'll try, because this is the DNS Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 Quote  Server Started. Using UDP Port #5400 API listening on 'http://localhost:5401'. API listening on 'http://theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401'. Connection Information:   Public IP: 104.41.13.150   Public Port: 5400    But still  Quote Ranking couldn't connect to host  Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 $config['username'] = "MY ACCOUNT"; Â Â Â Â Â Â Â Â Â // api username $config['pwd'] = "THE PASS OF ACCOUNT"; Â Â Â Â Â Â Â Â Â Â Â Â // api password $config['server'] = "theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401"; Â Â Â Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 should work now, i see  Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2020 Share Posted March 13, 2020 How to me work ? What do I type on the console now? What should I change? Link to comment Share on other sites More sharing options...
wishy Posted March 13, 2020 Author Share Posted March 13, 2020 3 minutes ago, Celtos said: $config['username'] = "MY ACCOUNT"; Â Â Â Â Â Â Â Â Â // api username $config['pwd'] = "THE PASS OF ACCOUNT"; Â Â Â Â Â Â Â Â Â Â Â Â // api password $config['server'] = "theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401"; Â Â Â this should work if that account has api access -> in console:Â api MY ACCOUNT true Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2020 Share Posted March 14, 2020 Still <? Quote  $config['username'] = "MY ACCOUNT";          // api username $config['pwd'] = "THE PASS OF ACCOUNT";   $config['server'] = "theceltosservidorsul.brazilsouth.cloudapp.azure.com:5401";             // your game api server ip:port $config['pageSize'] = "20";             // amount of players per page $config['page'] = "0";                   // what page to show $config['sortDirection'] = "Descending";    // Descending or Ascending ?>   ANd get  Quote Ranking couldn't connect to host  Link to comment Share on other sites More sharing options...
wishy Posted March 14, 2020 Author Share Posted March 14, 2020 this is yours  works from here Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now