Authentication by authorization_code (App)

Body raw

grant_type=authorization_code&client_id={client_id}&client_secret={client_secret}&code={pluggtocode}

Use this method if you want that your application oppened inside PluggTo

When create an APP in Pluggto you will register a URL that all users will be redirect when they click your application.

In the URL we will gonna send a parameter called "pluggtocode" that you should access an send to our API with your "client_id" and "client_secreat", passing it as the parameter "code". This code is valid only for the first called, or few minutes, and will give as return the user access_token and refresh_token that you should keep in your database.

To get a access_token from plugin authetication method you need 4 credencials.

  • client_id - Plugin API id
  • client_secret - Plugin API password
  • code - Pluggtocode parameter passed on the url
  • grant_type - Authorization_code

When using the ENDPOINT "users" will allow you to know the user who is acessing your application.

Once that you have the refresh_token will be possible to authenticate next time by refresh_token method.

Language
Click Try It! to start a request and see the response here!