Skip to main content
Use Connect at 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

Keep the password and both returned tokens on your server. Do not put them in browser code or in URLs.

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

Read exp 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.
When core cannot start the challenge, POST /api/token returns:

Finish the sign-in

POST https://core.grdd.net/api/token/mfa
On success, core returns the same body as POST /api/token, with these additions:
  • user.amr is ["pwd", "email"] and user.mfa_at is the time of the verification, in seconds since the Unix epoch.
  • mfa is {"enrolled": true}.
  • device holds a trusted-device token when you sent "trustDevice": true.
Each challenge expires after 10 minutes. After 5 wrong codes, core deletes the challenge and you start again with 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:
For 30 days, core then issues a token without a code. The device token stops working earlier if the user sets up email verification again.

Resend the code

POST https://core.grdd.net/api/token/mfa/resend
Core emails a new code for the same challenge. The challenge keeps its expiry time and its count of wrong codes.

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:
The 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. With Authorization: Bearer, core returns the token claims in user:
With the 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 successful POST /api/token call 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)

Core always returns this response, also when no token is sent.

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 GATEWAY or ADMIN role are an exception. Most core routes continue to accept their signed claims until exp.
  • Release does not change the legacy token.