Welcome to the SMAGLink developer portal !

This portal gives you access to Smag APIs universe. In particular, it provides access to the following APIs:

  • Weather
  • Crop
  • Farms & Fields
  • Authentication
  • and many others ...

You must contact Smag to access the APIs.


URL Description  URL for the SmagLink's Apis  URL for the SmagLink Developper Portal


Term Definition
GUID A GUID (globally unique identifier) is a unique identifier for a software component.
It is of the format: 00000000-0000-0000-0000-000000000000
Token An authentication token is a strong and secure authentication solution. The token has a life of 24 hours.
Subscription-Key Mandatory subscription key to be retrieved by the SmagLink developer portal. Found in your Profile.

A endpoint of an API is simply a unique URL that represents an object or collection of objects.


The application programming interface (API) is a standardized set of classes, methods, or functions that allows a software application to provide services to other software.
For SmagLink, an API is a functional domain.


JSON Web Token (JWT) allows the secure exchange of tokens between multiple parties. More information

Smag Token:

Request a token

This Endpoint makes it possible to obtain a token : Request a token with login/password (you must create a account and contact Smag to access the APIs)

Example of a body:





"Password": "Password1"




The response contains the token, the refresh token key and various information that make up the token, including subscriptions.

Example of response:

"ApplicationId": "MyApplicationID",
"UserId": "MyUserId",
"AuthId": "MyAuthId",
"Token": "MYTOKEN (ey...)","Refresh_Token": "MyRefreshToken",
"Identity": {
"application_id": "MyApplicationID",
"application_type": "APP1",
"application_name": "APP1",
"application_code": "APP1",
"Logins": [ "181","180"]
"Identities": [
"application_id": "MyApplicationID",
"application_type": "APP1",
"application_name": "APP1",
"application_code": "APP1",
"Logins": [ "181","180"]
"VaultKey": "https://thekeyvault"


Your token is present in the TOKEN part in the response.

Token Generator

You can use the Token Generator tool to generate a token : Token Generator

The token has a life of 24 hours. You can use the refresh token function.





SMAG authentication works with an RS256 encryption algorithm.
RS256 (RSA signature with SHA-256) is an asymmetric algorithm and uses a public / private key pair: the identity provider has a private key (secret) used to generate the signature and the consumer of the JWT obtains a public key validate Signature. Because the public key, unlike the private key, does not need to be secure, most identity providers make it easily available and accessible to consumers (usually via a metadata URL).


The connection to a Smag account is done in two stages:

  • User authentication, performed by a third party: security guarantor (password strength, brute force attack, confidentiality, uniqueness of a login / password)
  • Retrieving login information and redirection to the application with a token containing the information needed to open a work session.

Login to a Smag account via the login page in 4 steps (eg connection of a website or an application with a callback):



You can use the Example API to practice API operations : Example API (you must create an account to test the API)