[Help] Check for available Origin IDs

Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up
Belgobrine

Belgobrine

Active Member
7 Mar 2021
43
184
43
24
Boussu, Belgique
Hi ! Yesterday @StormzTheMemer asked if there was a fast and easy way to check if a list of IDs are available on Origin.
And I made a small and simple Python script just to do that.

You can download it on GitHub. You just have to write the IDs you want to verify in the file "ids.txt", run the "run.bat" file and the results will be written in a new file called "out.txt".
It's not much, I guess there are multiple other ways and languages to do that, but hey Python is fast and easy to write.
If there are any problems, just let me know.
And for anyone suspicious about the code, here it is.

Python:
import requests


# AUTHOR : Belgrobin/Belgobrine/florian-bougeatre

# Get ids from file
# If file not exist, create it
# Return ids array
def get_ids():
    filepath_in = "./ids.txt"
    try:
        ids = [line.removesuffix('\n') for line in open(filepath_in).readlines() if not line.startswith('#')]
    except FileNotFoundError:
        open(filepath_in, "w").write("#Start writing the ids to test below\n#Exemple :\nBelgobrine\nBelgrobrin")
        ids = [line.removesuffix('\n') for line in open(filepath_in).readlines() if not line.startswith('#')]
    finally:
        return ids


# Write the output array to file
def output(output_arr):
    filepath_out = "./out.txt"
    open(filepath_out, "a").writelines(output_arr)


# Iterate over ids array
# Verify the ids on Origin
# Write the result out array
def verify_ids(ids_arr):
    url = "https://signin.ea.com/p/ajax/user/checkOriginId?requestorId=portal&originId="
    out = []
    for id in ids_arr:
        json = requests.get(url + id).json()
        status, message = json["status"], json["message"]
        print(id, status, message)
        if status:
            out.append(f"{id} IS VALID\n")
        elif message == "origin_id_duplicated":
            out.append(f"{id} IS DUPLICATED\n")
        elif message == "origin_id_not_allowed":
            out.append(f"{id} IS NOT ALLOWED\n")
        else:
            out.append(f"{id} IS OTHER : {message}\n")
    return out


# Gets the ids
# Verify the ids
# Sends the results array to output function
output(verify_ids(get_ids()))

Code:
.\venv\Scripts\python.exe originID.py

EDIT : refactored the code a bit for an easier integration with the NRU bot
Another EDIT : here it is on GitHub : GitHub - florian-bougeatre/originID: Made a program to check if origin ids are available
 
Last edited:
When do we start the NRU IT department? Very nice work :)
it crowd maurice moss GIF


Thanks :D
 
Now watch Leandre add it to the NRU bot and add a ton of more useful functionality like he did with my stat checking script :D
Oh I didn't think about adding it to the bot, but yeah it could be a nice addition.
 
Now watch Leandre add it to the NRU bot and add a ton of more useful functionality like he did with my stat checking script :D
Python:
import requests


# AUTHOR : Belgrobin/Belgobrine/florian-bougeatre

# Get ids from file
# If file not exist, create it
# Return ids array
def get_ids():
    filepath_in = "./ids.txt"
    try:
        ids = [line.removesuffix('\n') for line in open(filepath_in).readlines() if not line.startswith('#')]
    except FileNotFoundError:
        open(filepath_in, "w").write("#Start writing the ids to test below\n#Exemple :\nBelgobrine\nBelgrobrin")
        ids = [line.removesuffix('\n') for line in open(filepath_in).readlines() if not line.startswith('#')]
    finally:
        return ids


# Write the output array to file
def output(output_arr):
    filepath_out = "./out.txt"
    open(filepath_out, "a").writelines(output_arr)


# Iterate over ids array
# Verify the ids on Origin
# Write the result out array
def verify_ids(ids_arr):
    url = "https://signin.ea.com/p/ajax/user/checkOriginId?requestorId=portal&originId="
    out = []
    for id in ids_arr:
        json = requests.get(url + id).json()
        status, message = json["status"], json["message"]
        print(id, status, message)
        if status:
            out.append(f"{id} IS VALID\n")
        elif message == "origin_id_duplicated":
            out.append(f"{id} IS DUPLICATED\n")
        elif message == "origin_id_not_allowed":
            out.append(f"{id} IS NOT ALLOWED\n")
        else:
            out.append(f"{id} IS OTHER : {message}\n")
    return out


# Gets the ids
# Verify the ids
# Sends the results array to output function
output(verify_ids(get_ids()))

Refactored the code a bit for an easier integration with the bot.
I could have used GitHub.
 
Last edited:
so please enlight me lol what can you do with that and what is the reason to check the id´s ??
@StormzTheMemer wanted to change his name on Origin and asked if there was a fast and easy way to check if the names he had in mind were available.
I was bored so I developed this quickly.
It just calls the AJAX request that is made by Origin's Sign-Up form when it verifies the name entered.
The script takes the list of names, calls the request and checks what is returned in the JSON.
As simple as it seems.
1650805016316
 
@StormzTheMemer wanted to change his name on Origin and asked if there was a fast and easy way to check if the names he had in mind were available.
I was bored so I developed this quickly.
It just calls the AJAX request that is made by Origin's Sign-Up form when it verifies the name entered.
The script takes the list of names, calls the request and checks what is returned in the JSON.
As simple as it seems.
ahhh. now i got it. was thinking why you will check the origin id but you talking about the name check.
 
  • Like
Reactions: Belgobrine
Can't you just click to change the name and then try out what you want there? :D
 
!check !c !id ?
I didn't think that this would be added since it's a tiny bit useless but hey thanks a lot ! :D
 

Users who are viewing this thread