Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Added

Une clé API se compose d'un ID client et d'un secret client (clé secrète). Avec cette clé API, vous pouvez envoyer une demande pour obtenir un jeton d'accès, qui peut ensuite être utilisé dans l'API REST et SOAP.

Panel
bgColor#eaf4fd

Les clients existants peuvent continuer à utiliser ispringlearn.eu. Les nouveaux clients doivent utiliser ispring.eu.

Exemple de requête

Code Block
curl --location 

An API Key consists of a Client ID and Client Secret (secret key). With this API Key, you can submit a request to obtain an access token, which can then be used in the REST and SOAP API.

Sample Request

...

'https://api-learn.ispringlearn.com/api/v3/token'

...

 \

...


--header

...

 'Content-Type: application/x-www-form-urlencoded'

...

 \

...


--header

...

 'Accept: application/json'

...

 \

...


--data-urlencode

...

 'client_id=788f274b-68f4-11ee-b2b4-d6615e040b19'

...

 \

...


--data-urlencode

...

 'client_secret=j016Mzmqxn0RpRuDp5K4xeMfgdUnuFgs2g8LLIFt-ho'

...

 \

...


--data-urlencode

...

 'grant_type=client_credentials'

...

Exemple de réponse

Code Block
{

...


    "access_token":

...

 "5_nz54vlUBIcxt8oJOmE5K6Qr1ARMy5jwPMdVATOCBB",

...


    "expires_in":

...

 1800,

...


    "token_type":

...

 "bearer"

...


}

Paramètres  de la requête

Paramètre

Description

...

access_token

Jeton d'accès de l'API du compte iSpring Learn

Account API Access Token

.

expires_in

The token’s lifetime is 1800 seconds

La durée de vie du jeton est de 1800 secondes (30 minutes).

After that, the token becomes invalid

Après cela, le jeton devient invalide.

token_type

The type of token used for authorization, which always takes the value of “bearer.”

...

Type de jeton utilisé pour l'autorisation, qui prend toujours la valeur « bearer ».


Terminé ! Vous avez maintenant un jeton d'accès. Utilisez maintenant le jeton d'accès dans l'API REST et SOAP. Le jeton d'accès est valide pendant 30 minutes.

Exemple de requête

Code Block
curl --location 

...

Sample Request

...

'https://api-learn.ispringlearn.com/content'

...

 \

...


--header

...

 'X-Target-Locale: en-US'

...

 \

...


--header

...

 'Accept: application/json'

...

 \

...


--header

...

 'Authorization: Bearer 5_nz54vlUBIcxt8oJOmE5K6Qr1ARMy5jwPMdVATOCBB'