On the redirect URL could not get 302 in JAVA but Postman works well

Here is an OKTA API call: GET
{{OAuthProviderUrl}}/oauth2/v1/authorize?client_id={{clientId}}&response_type=code&response_mode=query&scope={{scopes}}&state={{state}}&sessionToken={{sessionToken}}&redirect_uri={{redirectUri}}
The redirectUri sets as: http://localhost:3000/admin-user

It is able to get a auth. code by using Postman, but doesn’t work when I tried to implement the call in JAVA, where it always returns 302 with an error:
location: http://localhost:3000/admin-user?state=login&error=invalid_scope&error_description=Custom+scopes+are+not+allowed+for+this+request.
Could someone helps to figure out what difference between JAVA and Postman?

I believe it was answered on SO

the issue has fixed. Thanks.