NitrAPI-PHP icon indicating copy to clipboard operation
NitrAPI-PHP copied to clipboard

Example on how to authorize custom app on behalf of user

Open ItsMeStevieG opened this issue 4 years ago • 7 comments

I need to authenticate (like Beacon does) to gain access to boost history and server boosted days.

Any help? I need a PHP example on how to authenticate.

ItsMeStevieG avatar Oct 10 '20 09:10 ItsMeStevieG

I need to authenticate (like Beacon does) to gain access to boost history and server boosted days.

Any help? I need a PHP example on how to authenticate.

You are so right. I try to code something for my server, so player's can see server status, suspend time, current player number for each map and so on, but i fail to show this to website visitors, because they don't have authorisation to API. Maybe someone can help me?

killah0391 avatar Oct 10 '20 21:10 killah0391

I need to authenticate (like Beacon does) to gain access to boost history and server boosted days. Any help? I need a PHP example on how to authenticate.

You are so right. I try to code something for my server, so player's can see server status, suspend time, current player number for each map and so on, but i fail to show this to website visitors, because they don't have authorisation to API. Maybe someone can help me?

I am working on something at the moment which will allow this functionality. I’ll keep you posted

ItsMeStevieG avatar Jan 27 '21 06:01 ItsMeStevieG

I need to authenticate (like Beacon does) to gain access to boost history and server boosted days. Any help? I need a PHP example on how to authenticate.

You are so right. I try to code something for my server, so player's can see server status, suspend time, current player number for each map and so on, but i fail to show this to website visitors, because they don't have authorisation to API. Maybe someone can help me?

Check out what I made oauth2-nitrado. Hope this helps :)

ItsMeStevieG avatar Feb 16 '21 12:02 ItsMeStevieG

Could you explain why this was close without resolving? Nobody provided any examples of usage

ItsMeStevieG avatar Mar 22 '22 23:03 ItsMeStevieG

Sorry for the missunderstanding @ItsMeStevieG - I thought you provided your working example ;)
All available API endpoints are provided here: https://doc.nitrado.net/

Any specific endpoint with which you are struggling with?

NitradoTimo avatar Mar 23 '22 08:03 NitradoTimo

@NitradoTimo Yes I had provided a 3rd part authentication Example. Perhaps you could include some example of usage (especially oAuth) in the readme for the PHP API. This might clear up some confusion on the API :) If you provide this I'm sure this would be sufficient for what most users have had issues with.

Perhaps list the process of creating a long life token in the Nitrado site, or how to do on the fly authentication. Thanks

ItsMeStevieG avatar Sep 08 '23 09:09 ItsMeStevieG

Getting An Access Token

  1. Go to www.nitrado.com then click Log In.
  2. Login to your Nitrado Account.
  3. Once you are logged in, click the user menu at the top right, then click My Account.
  4. From the My Account screen, under the options section click Developer Portal.
  5. From the Developer Portal, click Long-life tokens.
  6. Authenticate with your nitrado account password, then click Verify.
  7. Type in an identification description for the token, then select which permission scopes you require from the checkboxes below, then click Create.
  8. You will see a message at the top saying A new long-life token has been created, please note this token: with the token code after. Copy this token and save it. !!! NOTE: Never share this with anybody else !!!

ItsMeStevieG avatar Sep 09 '23 02:09 ItsMeStevieG