Publication date: 08/13/2020

Resource Owner Grant

The Resource Owner grant is the only type that doesn’t require a redirect URL. If setting up Postman (the API development platform) is proving difficult, try this grant type.

The following snippet will create an OAuth token using the Resource Owner grant. This requires Client Secret() and Password().

token = New OAuth2 Token(
	User( "yourgoogleaccount@gmail.com" ),
	Password( "wordP@ss0192" ),
	Client ID( "1234abcd" ),
	Client Secret( "5678EfGh" ),
	Token URL( "https://example.com/services/v1/token" )
);

After you run this code once, clean it up and make it secure.

token = New OAuth2 Token(
	User( "yourgoogleaccount@gmail.com" ),
	Client ID( "1234abcd" ),
);
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).
.