😀
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

Was this helpful?

  1. English How-to

How to buy Numbers using API

You can use API to buy Number

To buy numbers, you can access from the following url:

POSThttps://api.globalsms.io/api/orders/create_number_order

Query Parameters

Name
Type
Description

counter

string

This is the UUID for your number.

duration

integer

This is the number of days you want these numbers.

condition

string

This is the condition of the number. Allowed values are "new" and "used"

pay_method

string

This is the type of order. Allowed values are : 'pay_per_did','pay_per_sms'

type

string

This is tyep tpe of SMS. We support both "sms" or "voice" verification.

country

string

This is the country where you want to buy number from. Allowed values are 'US' or 'CA'.

vendor_uuid

string

This is the vendor's uuid.

Example API calls for placing number order

curl -X 'POST'  
  'https://api.globalsms.io/api/orders/create_number_order'  
  -H 'accept: */*'  
  -H 'Authorization: Bearer eyJhbGciOiJsssssNiIsInR5cCI6IkpXVCJ9.dr3dfs2lkIjo3MSwiZmlyc3RfbmFtZSI6bnVsbCwibGFzdF9uYW1lIjpudWxsLCJlbWFpbCI6InBldGVkYW9AZ21haWwuY29tIiwiaXNfYWRtaW4iOmZhbHNlLCJsYXN0X2ZlIjp0cnVlLCJjcmVhdGVkX29uIjoiMjAyNC0wNi0xMlQxMjowNToyNC45MjRaIiwiaXNfcGVyc2lzdCI6bnVsbCwiYWxlcnRfb25fZGVsaXZlcnlfZXJyb3IiOm51bGwsImFsZXJ0X29uX29yZGVyX2V4cGlyYXRpb24iOm51bGwsImxvZ2luX2lwIjoiMTI3LjAuMC4xIiwicmVnaXN0ZXJfaXAiOm51bGwsInJlZ2lzdGVyZWRfb24iOm51bGwsImRlbGV0ZWQiOmZhbHNlLCJkZWxldGVkX29uIjpudWxsLCJpc19zdXBlcnVzZXIiOm51bGwsImlzX3Jlc2VsbGVyIjpudWxsLCJyZXNlbGxlcl91dWlkIjpudWxsLCJpYXQiOjE3MTkzMzAzMDQsImV4cCI6MTcxOTQxNjcwNH0.zLaCSoG59y90TVOyTw5V83JDvQVln8KXlBkIpl781HA' \
  -H 'Content-Type: application/json'  
  -d '{
  "app_uuid": [
    "a8933a9b-749e-4eca-8a22-be4dd1056cbb"
  ],
  "count": 5,
  "duration": 5,
  "condition": "new",
  "pay_method": "pay_per_did",
  "type": "sms",
  "country": "US",
  "vendor_uuid": "f307233e-d2ba-4eb0-bede-edb2cef9f8dd"
}' 

This API will return order_uuid. You can use the order_uuid to get the list of Numbers assigned to each order.

PreviousHow to buy numbers from UINextObtain Authentication Code

Last updated 8 months ago

Was this helpful?