发布日期: 11/15/2021

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" ),
);
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).