1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

LF>Help with Legends API

Discussion in 'Programming' started by Ju, Mar 19, 2023.

  1. Ju
    Offline

    Ju King Slime

    27
    10
    36
    Dec 23, 2017
    7:43 AM
    Warrior
    I am trying to use the API links in https://forum.maplelegends.com/index.php?threads/player-info-api.24681/ and make edits to the itemIds of the characters generated from the maplestory.io site

    I'm very new to working with APIs so I'm not sure if what I'm doing is legal or not. Anyway, I am trying to use
    Code:
    https://maplelegends.com/api/getavatar?name={SOMEIGN}&mount=1&animated=1&face=f2
    to obtain the maplestory.io link.

    When I attempt to make a GET request through JS as well as python on my own machine, I expect to see "location" in the response header(so that I can retrieve it but I can't) but I don't. I also get status code 200 instead of 303 so it would be cash monies if someone could enlighten me on how I might be able to retrieve the link either through some other mysterious manner or fixing some dumb mistake I am making here.

    I also attempted to read the content on python but I can't figure how I might be able to read this (the libraries in python just doesn't let me ignore the funny characters and read text)
    Code:
    �PNG
    →
    IHDR7♠;��
            pHYs��☺�+►IDATx��\]�cW§^gƹ��̜��◄�u�\�AZ∟Mh▼l��♦�*�5Q►G)�(�cI�A��\�A
    ▬↕Ep�)��>    M��o�{h�B§��▬,u�pO�↔�Ώ�����9;''�ɽ3�§�►r~v�^�^k���+������&�8�^�▼�S�%�C� ��I����Y*5C����ZW?�+�d�M^}♥ �J�☻�g��Q��↨��P4'�m◄E ▬��0�o♥�@�↑�Kv���c�A�♠�R�+P♠��   
    `��Tj�_Y��y�<�☺(�S��"♥����Q����*�l↕��-�w♣Ƀ'[��3f��V�"�$��[`{♣����
    �→���Y��I��0�.;�~B
    h��fd�I↑�`q��5��i�ܴj��{��A6(L5L62(y▬,`��nf→`,1L�
    J��♥0Ю"¶Q�Ȁ�‼e
    ��↓��A(‼↨����ؘl���\I�KYKY�E▲
    �H$�`Dz�:��[s���`§���L&S�%�;        .♥��`$��QÜ�☺@�9�U�RlP����LG��җ][��T
    4`�*    *���7�D��Ph��d+��p8L$��♠ɺ��7JER��→���q;��A,3�΄◄�↔5ŧ�ճ�3`!/�▲��♣�'♣�J
    ��Be�y��:�)‼��*.@X↓�.\`§2‼�☻˫b�}☺��Ӡ!Ϭ�D�G�I2↑to�A���i���
    ƹ�K�(��l��k↨x◄(�ڄWFj�Q�F<-�↕m4 ��JK�c`I_��#������♠�)@`R%��;r�F����jB���1���@�*Q|V♣�¶�☻s�♦�S$�ՙi?♣��DŽ�3�∟!h/w↓V7�֕"��� �↓��P)ɉ/
    ��R0d��∟�n����%*+���s�F��l�yѳ"*l����o♠↑3@i��☻~▬9�_↓�§�C.�RsM%�0#���2�����=$�ע�MF‼�Ho��♣�?eҹw�H�p�<�~�/��<�↑▼�♠��G�‼���↕▬�%f��K7��9♠F��'♥��qf¶�>cg2�0d☺�↑Q�^^�벆e♠∟T�V)_i�lb��#v�F�♥�    ↕�*     �N►↓�→��▬\�'�+!������u�4§D�D�|-vB*�W��G~T�
    -T�e��2�gX�)#6@���
    2i§'u���~��Dba����!♣V�����~�O6��↓�\��s�&����Jʬ→
    
    2�i
    ��♣�^��H�♦n♥~ר���M\�z��l�*m����
    �j<���6q�;�v↑P���♥���V�"�<&@☺*�"Q;)h#�˫�n�\�Y?�td֘◄|♥`�◄0♥�%�w)�☺�m���1 �☺k�d↔
    H����<�,♦'�◄‼Z`�↓�`���↨!�hb↑¶�↕↑5�-Ț♣‼O∟��~)��►GG-��͂뎲ql��H�o�§o}���NQYp�55�&�U��ė�ə���7��_':p�h�0��{��b�i����|���ͻ���G�b���↔��C���_Xɲ_��A�n    CA����B�
    �qB���g��S`��q�/=�7T�ʏ)�ۛ2[?�����s�◄↔J���↕¶T��ؕ¶���:�z�gD@��2?�����O��↔��▲z�N�&gt;M���5z�zL�/�G'N&amp;�U��j↓���^+E▲������o�̙3t�����˗��ٳ��~:x�]���#�Q{���Jj@0☺I? �↓b�V�↓�d�♥����j�_�g��8=��ϰ$�!:x���JB�5)�&amp;�ì��A���J<n��ƨ諟�♦�~vã'������o�k�^��f=��→�9c,�0-�r5���d��ϥ �s�;@��^���k�="" �ԧrc�☻�֫b1�r�9���du���q→?�3�§�;y���◄fr�n�uākgc��d��♠���u♠�&m�→�����x��8��  �ܣ�9"�↔MIM5;a���in§�t�☻�☺����dǹ�}�d��="" ��qz��?�u�►ݸ.l~�#��r|����+�p����q�;n1�♥���9♥l��yc���="">��g��r�BW.�3/�L��l%�� ������↓ܡ5�f?����4y�"��y�2‼$☺@
    &gt;�tlimp;��)k�♥������ĵ��x_ھZ��&lt;�p�Bz�~6Bt�߲��,Ҩ]f�r'���3:�Y�@@�����Q�^��∟�
    ��?�-�0n�Y�����w�tG↓�1Ua��▲%�?O�G�P�&amp;ыNfz��=˒$�N☻¤*��
    ��-�!8/��*奇�1����&gt;/p6☻t*��6��X
    ▬fR޻↑�+��y�&gt;`�s�_��↓�1q%
    D##�Yk�[c� ��$/♦��af►-��k♥�Nɳ�2�֘9���♦��둰W#n��_ع�↔�;K�♠�����}�=�k4:SR♥�↓A▲�"�-♣�Nד����#�&gt;�▲OE����%☺&amp;mL,I�?��X�▲褠d�J������◄�Yv�
    �q�0��"�A���{v?@I�P��6�o��DT�U�e�-♣'��$↑¶� fuV◄��ջT��N�]VL��s���gAm��)0d��l
    �%H�OrG+ aW
    #ν☻�m��ΖD▬x6↓�Zq��M-ڰ9→�∟‼�Q�TtB���:��v�k)8��-[�P��m�4�3q�☻��76"q�� ��xH5~׎♠S��E)��,��t�ݬ"�R�\Ҋ���꺴[�z=�'�¶u→¶ u��et�V��ޤ��Nv~�nP��9G~f�V�P)♣Nמ���_�\L'RK↕jV=j�Ʋ�ƙ.��6Ѹ/.{���c#1∟
    @♣�`fnZ3}�y�♠�"��∟҃U+l'կ��Th�m̘U1``h�p ����^�i��|�↓�
    S,→"�☻��☻�J�k�z��9[�[T&gt;↨���䶐�
    �[ߠ�pk*♥0�      L��[1��↑�→ٽ����↕֐۳�oHM}↕H�↕�����♣��:ll��(UE����w�m���r�Q        �F��∟����z��↕8�↕♠5���Y�`F� ☻
    �"↔�R�@����3�s(�3
    ��P(�|s։/♥��m4→��Rg�→
    �Q����@Z↑F��↕�
    l
    \���8�YHC.P��◄Κc8j��◄�(▲�}7�↔�ƄV��^�0��"R�→�����
    [�↔�3�(��Jo���J ]��↑��D�&gt;�↕�Q-���s&gt;�1�
    �N��Q�▲��'�Z��$ّt♠!▬h������)[젓Ŝ↕O:☺�☺��☺s�H�↓�♠↑��"9XQ►���▼HUU]‼|"��t�π��Tu�a!+�∟8k�♦↑8@��3f�uü��m�x=�
    ����a�� �n6���*n�I��;�nJ��&gt;���↓X↔UES�rG�(-Ǚ$¶9�Ww�˨k�`��,H♠��[�n`��&gt;��3����Tb
    ☻‼L�♠�p���▲�~N�Ls�¶G↕T�+�►@;��9‼�;�¶�D s����kSv��L      ����'�Tq��\♠►→Gu�Tf�F�Q��`��{�z�V☺Z����9����ah�S�\v*iѹ�↓p��X�C�z�J�'§\�¶��z�4§����3��z�9v�۪�☻♥Ul��=�%�fmz♥�¶8↨��y�b��o��↔↔D�¶���♣‼naTcL�H�73�|��(��I�ʚ�ɩ��nI�SD☻r����UK�1A$ ֨F☻►��)���◄H2�Y�����L5uk����j��]��=xk&lt;���h(*�/♣2��X�¶ 3��0��¶n�
    N���rRгn"▬�3¶ۓ�→&lt;h�
    ��d�z-☻�¶\♠P������Ħ4_��pȡ��3�↑◄^w^��►\��(��ܗV
    �K��4��♥kbpjF��W9�&amp;[�PM�Ȭ�_x�D�B�k�0��ԏݶ�+moo�7664͐��;-�$↕�c�}���
    �¶��J��!�|��*�♦�☺&amp;♦�Ĭ6�c2   ���BΟ§V5Um��k6F�
    ��→�-KL�hW����i)���9d㱳N�i&lt;→������ň�☺♠���7��NּK�s�qdڄZY�Ⱥ*�§��*�P    �|oQ‼��t+$�v��)
    ��_���♥��s�♣�IEND�B`��  {"notice":"Generated by MapleStory.IO","container":"io-fs-cache-7c589645bc-7gspg","gitHash":"63d5e77aaa441ac0bd9e26fe1859c0c28b3f3063","url":"/api/character/%7B%22itemId%22:44610,%22version%22:%22236%22%7D,%7B%22itemId%22:1812003,%22version%22:%22236%22%7D,%7B%22itemId%22:1812002,%22version%22:%22236%22%7D,%7B%22itemId%22:1102039,%22version%22:%22236%22%7D,%7B%22itemId%22:1082102,%22version%22:%22236%22%7D,%7B%22itemId%22:1072153,%22version%22:%22236%22%7D,%7B%22itemId%22:1061067,%22version%22:%22236%22%7D,%7B%22itemId%22:1042290,%22version%22:%22236%22%7D,%7B%22itemId%22:1032024,%22version%22:%22236%22%7D,%7B%22itemId%22:1022037,%22version%22:%22236%22%7D,%7B%22itemId%22:1012083,%22animationName%22:%22smile%22,%22version%22:%22236%22%7D,%7B%22itemId%22:1003071,%22version%22:%22236%22%7D,%7B%22itemId%22:1122059,%22region%22:%22TMS%22,%22version%22:%22209%22%7D,%7B%22itemId%22:1482012,%22version%22:%22236%22%7D,%7B%22itemId%22:2000,%22version%22:%22236%22%7D,%7B%22itemId%22:12000,%22version%22:%22236%22%7D,%7B%22itemId%22:21133,%22animationName%22:%22smile%22,%22version%22:%22236%22%7D/stand1","createdAt":"2023-03-18T14:34:17.9107278Z","meta":null}</n��ƨ諟�♦�~vã'������o�k�^��f=��→�9c,�0-�r5���d��ϥ>

    Thank you in advance for any advice to this matter
     
    • Informative Informative x 1
  2. ngrman
    Offline

    ngrman Stone Golem

    119
    22
    135
    Jun 4, 2017
    Female
    Brasília
    7:43 PM
    The response header has `Content-Type: image/png`
    So the funny characters you are looking at are the bytes of the images.
    You can write to file the request and it should download the image
    In the end of the payload there's an attribute "url" which has the link you're looking for, in which you append to maplestory.io
    [​IMG]
     
  3. geospiza
    Offline

    geospiza Web Developer Staff Member Web Developer

    212
    449
    215
    Apr 16, 2020
    4:43 PM
    geospiza
    Dark Knight
    146
    Funk
    • Informative Informative x 1
  4. OP
    OP
    Ju
    Offline

    Ju King Slime

    27
    10
    36
    Dec 23, 2017
    7:43 AM
    Warrior

    Exactly what I was looking for! And I didn't know it was that easy smh
    Edit: Thanks for spending the time to explain to a nub here, mad appreciates

    Thankies for the input ;w; was desperate and I decided to read the content but my dumb butt don't know how to get the url
     

Share This Page