All URIs are relative to https://api.ipify.org
Method | HTTP request | Description |
---|---|---|
getIp | GET / | Get your public IP address |
String getIp(opts)
Get your public IP address
import OpenapiIpify from 'openapi_ipify';
let apiInstance = new OpenapiIpify.DefaultApi();
let opts = {
'format': "format_example", // String | Response format
'callback': "callback_example" // String | JSONP callback function name
};
apiInstance.getIp(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
format | String | Response format | [optional] |
callback | String | JSONP callback function name | [optional] |
String
No authorization required
- Content-Type: Not defined
- Accept: text/plain, text/javascript, application/json