Sim5 Net
Profile Data
import requests
def fetch_user_profile(token):
# Define the API endpoint
url = 'https://5sim.net/v1/user/profile'
# Set up the headers with the provided token
headers = {
'Authorization': 'Bearer ' + token,
'Accept': 'application/json',
}
try:
# Make the GET request to the API
response = requests.get(url, headers=headers)
# Check if the request was successful
if response.status_code == 200:
# Return the JSON response
return response.json()
else:
# Print an error message if the request failed
return f"Error: {response.status_code} - {response.text}"
except requests.RequestException as e:
# Handle any exceptions that occurred during the request
return f"An error occurred: {e}"
if __name__ == '__main__':
# Replace 'Your token' with your actual token
token = 'Your token'
# Fetch user profile data
profile_data = fetch_user_profile(token)
# Print the profile data
print(profile_data)
Request Number (you can change country by your wish)
import requests
# API token
token = 'Your Token'
# Parameters
country = 'russia'
operator = 'any'
product = 'amazon'
# Set up the headers with the provided token
headers = {
'Authorization': 'Bearer ' + token,
'Accept': 'application/json',
}
# Construct the URL for the API request
url = f'https://5sim.net/v1/user/buy/activation/{country}/{operator}/{product}'
# Make the GET request to the API
response = requests.get(url, headers=headers)
# Check if the request was successful
if response.status_code == 200:
# Print the response JSON if the request was successful
print(response.json())
else:
# Print an error message if the request failed
print(f"Error: {response.status_code} - {response.text}")
Request to get code from number
import requests
import time
# API token
token = 'Your token'
# ID for checking the status
id = 1
# Set up the headers with the provided token
headers = {
'Authorization': 'Bearer ' + token,
'Accept': 'application/json',
}
# URL for the status check
status_url = f'https://5sim.net/v1/user/check/{id}'
def check_status():
try:
# Make the GET request to check the status
response = requests.get(status_url, headers=headers)
# Check if the request was successful
if response.status_code == 200:
data = response.json()
# Assuming 'status' is a key in the response JSON indicating review
status
# Adjust according to actual response structure
if data.get('status') == 'completed': # Replace with the actual status
value indicating completion
return True, data
else:
return False, data
else:
return False, f"Error: {response.status_code} - {response.text}"
except requests.RequestException as e:
return False, f"An error occurred: {e}"
def wait_for_review():
while True:
completed, result = check_status()
if completed:
print("Code review completed:", result)
break
else:
print("Waiting for code review to complete...")
print(result)
time.sleep(30) # Wait for 30 seconds before checking again
# Start the process
wait_for_review()