Jump to content

  •  

- - - - -

How to use REST & OAuth?


  • Please log in to reply
4 replies to this topic

#1 TrynCatchMe

TrynCatchMe

    Member

  • Member
  • PipPip
  • 18 posts

Posted 15 May 2019 - 07:37 PM

I am trying to use the built in REST and OATH function, I am trying to make it so I can login via my C# program, But I am unsure how exactly to login with username/email password to get the Oath token?

#2 TrynCatchMe

TrynCatchMe

    Member

  • Member
  • PipPip
  • 18 posts

Posted 15 May 2019 - 07:50 PM

I am trying to use the grant type login with username/password

#3 Rayttor

Rayttor

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 21 May 2019 - 05:35 PM

U can simply generate API key in ur ACP and use it or connect to ur DB :D

#4 cold

cold

    Management Team

  • Community Management
  • 370 posts

Donator

Posted 22 May 2019 - 04:34 PM

View PostTrynCatchMe, on 15 May 2019 - 07:50 PM, said:

I am trying to use the grant type login with username/password

You don't even need to use the built-in API for it. Just make a PHP script and POST to it from your c# application: the script checks if the name exists in the DB -> if yes check if the password matches the hash -> if yes login :)

I've made this before in c# so DM me on Discord if you need more help ;)
Community Rules | IV Discord | News
discord: cold#0001
steam: /id/hitmarker

#5 TrynCatchMe

TrynCatchMe

    Member

  • Member
  • PipPip
  • 18 posts

Posted 23 May 2019 - 02:24 AM

View Postcold, on 22 May 2019 - 04:34 PM, said:

You don't even need to use the built-in API for it. Just make a PHP script and POST to it from your c# application: the script checks if the name exists in the DB -> if yes check if the password matches the hash -> if yes login :)

I've made this before in c# so DM me on Discord if you need more help ;)

I have gotten the regular api they have to work perfectly
The only issue I am having now is when I call this for example

GET https://website.url/api/core/me

It returns the basic data but not all of it such as one I need is secondary user groups but it is not returning this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users