Skip to content

GET /stubs/handler_api.php?action=getBalance

Get information on current user balance

Returns the current user balance.

You call this method to check the balance of the profile to top it up when needed or to handle WARNING_LOW_BALANCE exceptions.

Security

  • api_key
  • BearerAuth
  • OAuth2 (Scopes: sms-scope, rent-scope)
    • sms-scope: grants access to manage numbers for the SMS receiving service from Onlinesim
    • rent-scope: grants access to renting phone numbers from Onlinesim

Parameters

NameTypeDescription
action*string

Method name, in this case getBalance

Enum:getBalanceDefault:getBalance

Responses

200

Successful getBalance response from the server: either returns
your profile’'s current available balance or throws an exception.

Code Samples