1. Support
  2. Montel Web API
  3. Montel Web Application Programming Interface (API)

Montel Web API: Autorization and GetToken

Most functions in the Montel Web API require that a token is set in the Authorization http header. A token can be obtained by calling the GetToken function.

A token consists of a session ID representing a session on the Montel Web API server. Sessions can be invalidated at any time by Montel. Tokens with an invalidated session ID will result in “401 unauthorized”, even if the token itself is not expired. Call GetToken again to renew the session.

 

When calling the GetToken function, username, password, and ClientId should not be sent in the querystring, but as content. Subsequent use of the received token should not involve the token as part of the URL itself. More information can be found under the heading "10.1.1 GetToken" in the Montel Web API user manual.

 

cURL example: 
--request POST   
--url https://api.montelnews.com/gettoken 
--data 'grant_type=password&client_Id={clientID}&username={username}&password={password}'

 

Note: There will only be one valid session per combination of username and clientId at any time. Previous sessions are invalidated each time you call the GetToken function.

 

Find and view the Montel Web API user manual (pdf) in the Introduction to Montel Web API article.