Skip to main content
Question

Error 400: invalid_grant (sub claim) when requesting for Enterprise Token

  • May 21, 2025
  • 3 replies
  • 46 views

Forum|alt.badge.img

I was able to request an enterprise token in my local server.

But when I moved to linux remote server (aws), I keep getting invalid_grant error when requesting for an Enterprise Token. It says "Please check the 'sub' claim". I'm using the same enterprise id used in my local server.

 

I've added a separate public key and made sure it was set up properly in my code with the corresponding private key and password. I'm using Boxr client and this is the error:

Boxr::BoxrError: 400: {"error":"invalid_grant","error_description":"Please check the 'sub' claim."}
	from /data/medifi/shared/bundle/ruby/2.1.0/gems/boxr-1.2.0/lib/boxr/auth.rb:90:in `auth_post'
	from /data/medifi/shared/bundle/ruby/2.1.0/gems/boxr-1.2.0/lib/boxr/auth.rb:24:in `get_tokens'
	from /data/medifi/shared/bundle/ruby/2.1.0/gems/boxr-1.2.0/lib/boxr/auth.rb:32:in `get_enterprise_token'

 

3 replies

Forum|alt.badge.img

Were you able to resolve this?  I have a similar issue - though without the migration to AWS mine's on a local instance.


Forum|alt.badge.img

I'm also getting this error. Any luck on setting up correctly?


Forum|alt.badge.img

 Based on the discussion in this thread, it might be a type error. Can you please confirm if you are setting enterprise id as a string?