😀
Globalsms.io
  • English How-to
    • Globalsms PVA FAQ
    • How to buy numbers from UI
    • How to buy Numbers using API
      • Obtain Authentication Code
    • How to get SMS from API
    • How to get Voice Verification Code from API
    • How to get Numbers for an order
    • Copy of How to get support
  • 中文用户手册
    • 常见问题
    • 用平台页面购买好吗
    • 用API购买号码
      • 获取授权码
      • 取所有平台支持的APP
      • 取平台支持的号码供应商
      • 取每一个APP的号码数量
Powered by GitBook
On this page
  • auth
  • Example

Was this helpful?

  1. English How-to
  2. How to buy Numbers using API

Obtain Authentication Code

You will need to obtain an authorization code in order to use API to purchase numbers.

auth

GET https://api.globalsms.io/api_gsim/v1/auth

Headers

Name
Type
Description

username

string

This is the login you use in UI portal.

password

string

This is the password you use in UI portal.

{
  "success": true,
  "data": {
    "access": "eyJhbGcinJlZ2lzdGVyZWRfb24iOm51bGwsImRlbGV0ZWudWxsLCJpc19zdXBlcnVzZXIiOm51bGwsImlzX3Jlc2VsbGVyIjpudWxsLCJyZXNlbGxlcl91dWlkIjpudWxsLCJpYXQiOjE3MTkzMzAzMDQsImV4cCI6MTcxOTQxNjc"
  }
}
{
  "statusCode": 400,
  "message": "Wrong password",
  "error": "Bad Request"
}

Example

curl -X 'POST'  
  'https://api.globalsms.io/api/auth/login'  
  -H 'accept: */*'  
  -H 'Content-Type: application/json'  
  -d '{
  "email": "your@mail.com",
  "password": "1234567890"
}'

PreviousHow to buy Numbers using APINextHow to get SMS from API

Last updated 8 months ago

Was this helpful?