Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

How can i get access token

I am trying but i am getting error.

{“message”:“MismatchingRedirectURIError(’(invalid_request) Mismatching redirect URI. <oauthlib.Request SANITIZED>’,)”}
redirect uri =https://www.getpostman.com/oauth2/callback

Callback url is different?
https://app.getpostman.com/

@revant_one thanks but now im getting
Screenshot%20from%202021-05-12%2019-23-55
return fn(*args, **newargs)\nTypeError: login_via_frappe() missing 2 required positional arguments: ‘code’ and ‘state’\n"]"

Can you share details about OAuth Client created in ERPNext

please see below details

OAuth Client

client_id: “0399ec04da”
client_secret: “a08268cf7e”
default_redirect_uri: “http://0.0.0.0:8008/api/method/frappe.www.login.login_via_frappe
docstatus: 0
doctype: “OAuth Client”
grant_type: “Authorization Code”
redirect_uris: “http://0.0.0.0:8008/api/method/frappe.www.login.login_via_frappe
response_type: “Code”
scopes: “all openid”
skip_authorization: 0

I am following these documention
https://frappeframework.com/docs/user/en/guides/integration/rest_api/oauth2
when i am trying to run this api
http://0.0.0.0:8008/api/method/frappe.integrations.oauth2.authorize
parameter

state:444
response_type:code
scope:openid all
redirect_uri:https://app.getpostman.com/oauth2/callback
client_id:0399ec04da
response is :-Missing client_id parameter. <oauthlib.Request SANITIZED>’,

These are incorrect.

Use the postman callback url here

https://www.getpostman.com/oauth2/callback

Also need to use this in postman

@revant_one thanks