While it is sometimes easy to use your username and password to authenticate API request to your SMS account. It is always better to use an access token to authenticate your request. The advantages include better security and the ability to change your password at any time without needing to update your code.
To generate an access token for your Loftysms.com account, follow the guidelines below.
- Click this this link https://www.loftysms.com/user/apps to generate your access token.
- If you're prompted to log-in, Login to your account with your registered Email Address / Username and your password.
- After Logging in click on create new token on the same row as Personal Access Token.
- Enter a name to identify your token, this is only important for identification purpose. Then click create to generate the token. Copy the Token and save it
- Attach the Token to your request Header in the format below. There is space between the bearer and the token
Authorization Bearer token_generated_here