Menu

Expand

Accessing Server Services

The username and password shall be provided by your account manager from ValueFirst. This authorisation information will be required to generate a bearer token which will be further used for availing the services of ValueFirst.

Token Management

A bearer token is used to perform the MT actions and can be managed using service API Key which can be obtained using MIS panel. Following actions are linked to token:

  1. Token Generation
  2. Token Enable
  3. Token Disable
  4. Token Delete

Note: The generated token can be sent in both Bearer as well as API key based authorization.

Delete, enable and disable can be done for all tokens or for a specific given token as well. To perform for any of the mentioned actions for all use “Token=all”

Token Rotation

Token generated will have expiry date which is 7 days so new token need to be generated before old token get expiry. This new token will further be used for MT actions. Please update your tokens timely to avoid any termination issues. An expiry date of the token is provided in every response of token generation request.

Note: Please save your old token as an old token will be required while rotating token. First time token generation using an API Key will not validate the old token. In case you missed saving your old token then you can use Refresh Existing Key option on MIS post which you need not to share old token and you can generate a fresh token till 24 hours, use it for rotation.

Token Generation

Sample Request

URL: https://api.myvfirst.com/psms/api/messages/token?action=generate
Request : POST
Authorization : API Key in Header
Body: RAW Data Content-Type: application/json {"old_token":"eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS5teXZhbHVlZmlyc3QuY29tL3BzbXMiLCJzdWI iOiJkZW1vZmFoZWVteG1sIiwiZXhwIjoxNjQ3MDgxODE2fQ.YSJdO51g_ddJ9Fd40ahKGeGHG9E78moGCKLmf33YeXU"}

WA_Sandbox.png

WA_Sandbox.png

Sample Response

{
"token": "eyJhbKJKJKVibskuI1NiJ9.eyJpcBXMIYOBodHRwczovL2FwaS5teXZhbHVlZmlyc3QuY29tL3BzbXMiLCJzdWIiOiJkZW1v c291bXlheG1sMyIsImV4cCI6MTYxOTE4MDg3M30.rPuvLBiNoZKusW3GHTHoZCW-Nl9MMCHWLfo9gLjd66k", "expiryDate": "2021-04-21 17:57:53"
}

Token Enable

Sample Request (Single Token Enable)

URL:https://api.myvfirst.com/psms/api/messages/token?action=enable&token=eyJhbKJKJKVibskuI1NiJ9.eyJpcBXMIYOBodHRwczovL2FwaS5teXZhbHVlZmlyc3QuY29tL3BzbXMiLCJzdWIiOiJkZW1vc291bXlheG1sMyIsImV4cCI6MTYxOTE4MDg3M30.rPuvLBiNoZKusW3GHTHoZCW-Nl9MMCHWLfo9gLjd66k
Request : POST
Authorization : API Key in Header

Sample Request (All Token Enable)

URL: https://api.myvfirst.com/psms/api/messages/token?action=enable&token=All
Request : POST
Authorization : API Key in Header

Token Disable

Sample Request (Single Token Disable)

URL:https://api.myvfirst.com/psms/api/messages/token?action=disable&token=eyJhbKJKJKVibskuI1NiJ9.eyJpcBXMIYOBodHRwczovL2FwaS5teXZhbHVlZmlyc3QuY29tL3BzbXMiLCJzdWIiOiJkZW1vc291bXlheG1sMyIsImV4cCI6MTYxOTE4MDg3M30.rPuvLBiNoZKusW3GHTHoZCW-Nl9MMCHWLfo9gLjd66k
Request : POST
Authorization : API Key in Header

Sample Request (All Token Disable)

URL: https://api.myvfirst.com/psms/api/messages/token?action=disable&token=All
Request : POST
Authorization : API Key in Header

Token Delete

Sample Request (Single Token Delete)

URL:https://api.myvfirst.com/psms/api/messages/token?action=delete&token=eyJhbKJKJKVibskuI1NiJ9.eyJpcBXMIYOBodHRwczovL2FwaS5teXZhbHVlZmlyc3QuY29tL3BzbXMiLCJzdWIiOiJkZW1vc291bXlheG1sMyIsImV4cCI6MTYxOTE4MDg3M30.rPuvLBiNoZKusW3GHTHoZCW-Nl9MMCHWLfo9gLjd66k
Request : POST
Authorization : API Key in Header

Sample Request (All Token Delete)

URL: https://api.myvfirst.com/psms/api/messages/token?action=delete&token=All
Request : POST
Authorization : API Key in Header

The End Point for accessing ValueFirst XML API is https://api.myvfirst.com/psms/servlet/psms.Eservice2

The above URL accepts data through in raw as well as in x-www-form-urlencoded. In raw application/xml will be used and in case of x-www-form-urlencoded the two parameters namely “data” and “action”. The data parameter specifies XML content that needs to be posted. The action parameter is different for each XML (Table 2).

XMLData ParameterAction Parameter
Sending messageSMS-MT Version XML (URN and HTML encoded)send
Checking statusSMS-SR Version XML (URN and HTML encoded)status
Checking creditsSMS-CR Version XML (URN and HTML encoded)credits

Table 2 Values for „data‟ and „action‟ parameter.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more