https://data.grdd.net for the documented Connect tasks. Get the access token through Core below. General token issuance, verification and release do not have matching Connect routes.
Get Token API
GNet core issues the tokens that the GNet Connect API uses. This page covers these core routes:
Core hosts:
https://core.grdd.net (production) and https://core.grdd.dev
(development). See the Core Operations overview
for the header forms that core routes accept.
To get a token for a client company of your vendor platform, see
Partner Impersonation.
Get a token
Endpoint
POST https://core.grdd.net/api/token
Request body
Success response (200)
If the user has turned on email verification, this call does not return a
token. It returns
"mfaRequired": true and a challenge instead. See
Email verification.
Token lifetime
Readexp to know when the access token expires. Do not assume a fixed
lifetime. In source, the default lifetime is 90 days, and 365 days for users
with the GATEWAY role. The deployment can change these defaults.
Each successful call issues a new access token. Core reuses your existing
legacy token if you already have one.
Error responses
Core counts every attempt toward the 429 limit, including successful ones.
Email verification
Users can turn on email verification for their account. For those users,POST /api/token checks the password, emails a 6-digit code, and returns a
challenge instead of a token. You finish the sign-in with
POST /api/token/mfa.
Users with the GATEWAY role are never asked for a code and cannot turn email
verification on. For a server that signs in without a person present, use a
GATEWAY user. Do not automate reading the verification email.
Challenge response (200)
Check
mfaRequired before you treat "success": false as a failed sign-in.
The response status is 200.POST /api/token returns:
Finish the sign-in
POST https://core.grdd.net/api/token/mfa
POST /api/token, with these additions:
user.amris["pwd", "email"]anduser.mfa_atis the time of the verification, in seconds since the Unix epoch.mfais{"enrolled": true}.deviceholds a trusted-device token when you sent"trustDevice": true.
POST /api/token.
Trusted device
With"trustDevice": true, the response includes device. Send it as
device in the body of later POST /api/token calls for the same user:
Resend the code
POST https://core.grdd.net/api/token/mfa/resend
Verify a token
Use this route to check that a token is still valid and to read its details.Endpoint
GET https://core.grdd.net/api/token
Headers
Send the token in one of these forms:token header accepts the access token or the legacy token. The GNet
Connect API service verifies tokens this way: it sends the token to this route
in the token header.
Success response (200)
The response shape depends on the header that you send. WithAuthorization: Bearer, core returns the token claims in user:
token header, core returns the details in token. For an access
token, token holds the token claims. For a legacy token, token holds the
stored user details for that token, without password fields. Its fields are
not the same as the token claims; read username and griddid from it.
Rules that core applies
- An access token must have a valid signature and must not be expired.
- The user must still be signed in on core. After you release a token, core rejects it.
- With
Authorization: Bearer, core accepts only the most recent access token that it issued for that user. Each successfulPOST /api/tokencall for the same username replaces the previous token for this check. Other core routes do not apply this rule. - With
Authorization: Bearer, the user must be enabled and the company must be active.
Error responses
In some cases core returns HTTP 200 with
"success": false. Always check
success. Treat false as an invalid token.Release a token
Use this route when your integration signs out.Endpoint
DELETE https://core.grdd.net/api/token
Headers
Response (200)
What release does
- Core removes the signed-in session for the user of the access token. After that, core routes reject that access token.
- Tokens with the
GATEWAYorADMINrole are an exception. Most core routes continue to accept their signed claims untilexp. - Release does not change the legacy token.