ios8.3 - IOS Gmail API - How to get "messageId" of an Email with an attachment -
i using gmail api 1 of ios application.gmail api.i successful in authorizing user login process. got list of mails (users.threads.list) , result shown below.
now need mail attachment (user.messages.attachment.get).for need pass 3 parameters i.e. emailid,messageid,id.
my problem "how messageid"?
thanks :)
the threadid in first request id identifies thread, , same first message in thread. has nothing attachment.
my latest message in inbox has attachment. listing mail:
get https://www.googleapis.com/gmail/v1/users/me/messages?maxresults=1&access_token={your_api_key}
response:
{ "messages": [ { "id": "14e8bf63dd00a52f", // message id! "threadid": "14e8bf63dd00a52f" // since first message in thread, // threadid same. } ], "nextpagetoken": "01097010197696465829", "resultsizeestimate": 3 }
i use id message's attachmentid:
get https://www.googleapis.com/gmail/v1/users/me/messages/14e8bf63dd00a52f?fields=payload%2fparts%2fbody%2fattachmentid&format=full&access_token={your_api_key}
response:
{ "payload": { "parts": [ { "body": { "attachmentid": "angjdj9uyxwpb8pvwgfrzmc3un92ydlmtef2-at-0zwg88keyxomvylxzfmooq7yvc-14vboqgsscueydzo103m28hnnuac-2ksnf5yik_74bunqlmxcuar3ofawvjss8s8nwqjkrevustb5y4xhhnaj7z7cckurfqbsablfcf75boshvhsd1rdeoi33e-7y-1jagn3vn-afroqkvesclvr_qht2298tlrhyvzj30epnofnzoyap_up54xzhmxxsm9ydfzvktwfiwqlm4iyjqyx5_enwuaeqbembot43fq" } } ] } }
then, finally, use message's id , attachmentid attachment:
get https://www.googleapis.com/gmail/v1/users/me/messages/14e8bf63dd00a52f/attachments/angjdj9uyxwpb8pvwgfrzmc3un92ydlmtef2-at-0zwg88keyxomvylxzfmooq7yvc-14vboqgsscueydzo103m28hnnuac-2ksnf5yik_74bunqlmxcuar3ofawvjss8s8nwqjkrevustb5y4xhhnaj7z7cckurfqbsablfcf75boshvhsd1rdeoi33e-7y-1jagn3vn-afroqkvesclvr_qht2298tlrhyvzj30epnofnzoyap_up54xzhmxxsm9ydfzvktwfiwqlm4iyjqyx5_enwuaeqbembot43fq?access_token={your_api_key}
response:
{ "size": 3115, "data": "ivborw0kggoaaaansuheugaaacaaaaagcayaaabzenr0aaae1mldq1bjq0mguhjvzmlszqaaejzllwtmk3cuxp_37r2otfcltnfxxhbzyr2greii0cedebbuoix09izuw3jzuhfkuxlg8iyxmmrchhiulwwuka4zzhstooldzjdhvga13hbvgwreuw9d5inxyt57pj15knnyzj_5_r-af1rh0xysgdxpxqjiy6lmtrbf6wuxfejgcu-doycosu1nwltrpbceafwo0tg0pslpvulm6_x5vgp6dy-obxnf3gcaedkzmiyaoabicpw6dibe79sfazcstne2gmggidhk6owaqqoqmwqveibqayznqfvkgnwnyfyvvikbvjwa8ujdjg1gbwmgzzoa8wd2kya1ywgqmac8bgabdtrja_jzaiks1nwjwn8micbtk0u518xfbygoaqtphlcewe85gptxhddlbui9gdbphpd8bggaxcc_fywndqeaeoi2go_ncazvac6vwmt5dsey2oey7we4mqbpumefu_jvgxubymefxpingghrikpoj8reclfndjdh5e7yfytmdbizdpuzl5vafcu7yd8smlkkuka6zrmqj2w4f4rqxy88myu3pavt5nqptu3w2tojdsbbt92vxd82wh327q9pb-3_qorjitdyozxhexttefyoaxr6bp2nl-kxjpqkpst3lbkq3djbnozsf-2grs24lceylmuatvsvsap5remlt1ffkb2yrqu8deoblbu3vvsv7krrzlvl68z1zl6ya983dfw43bzwutzqb1988trzfz3s82cufvde9gr_hlzwp9b3594d16gyz1tgnrxy7nc8cbsbpkkobbdig3rgljhlrclokd6kjexjxbha2ar2au4a5zf3j28-n-b3cna5mk4zbvhcmelx7iqrwvzp0sfxnayxnp8s4901vetdtd9c0b6rfl7-xkyxqmgkwafybuhv2kvwquif0rzfjs6mprrne1-vodmppivi0q31loy4le72xs--0xeyknodl4usw3r_wa-fe4vxfqlziysdwxes3lpx2ubftubu4fu37iquuv67us5v76wg8sbeq9n-wohri4jjc46var88tayjoppghcbfyy-xxam7ar-zdnv4fvfqw7-trl-8ctsjasr4h-firr524bc8icgim9hdpcsjybryjws5y842sp9ykrib3d7edn6gimcf4zlkesttqdjodpgpwoxrkpge3oi10jv3xve0huklvipvoj-hpy9aeoglkwenydegtiq9dq9vfeecirjgp8fuj0o8maenkth5_cj12t30rzuffn6tldnfgsaxnjfxwrt5oyzqdn9l16qdx21am1ewvd5wa3vt1crm7rxvs3ypvvwqhauz1_-xr_tax9ojwx7ncs3vrsptzcnb2aodyy4exxt02hv_6n94q2lx3d0xgpfk2xdx2awhw8mqkxdnnwia90on9ppc15oandwdaislnjqdi-3agnnatslghwl4gofuiabwglhladewe8qdmvgoavmuufwukfsu0qm4mw0aidiv1bkopc5i1jm6m-l1ditgxkloyaafjxswwaw9gohggwng_2r9f2uzfdkaqjlpfzpmnfwbfuptfholzlfsk2wmrkyl5bmczvsixb4kam7cbqcuckjnaoatz7rvzp0hbnfbuklmt0aaaacqsurbvfif7zzbif1xgcd_67iv55w5z66zadi4aww1xu6xoammpkzy-yreerofffoibs_0qehbfapoh0uliocrjnbaezswktbcoezttvntm6bjte06m2cu57lp3mvvvdbnw0xlswekrcehxfa97lx35vfjz9rf_ud_6399qu_y8nyzrw4nw-pb5o4-vfhxxhkxlufln3055lf0qcefdarz64nhhnvrpyowep7oceprr01oldrpl6pm7ku1b4bgdaiq9zgnhvlxv_f_w0a29nmybdzc_sx3z_xbanlx_nhrdo2j1m49kmx8htv9l-guqtliupcvqxcidqjamxa3whnk_cwqf14nx82fhf_v_fatnso_scd1n-7ezyu71g4unignt4gdhcflzo3pyno_olumdlagrfhviqpxbdv9ba7dhpqdrdzh1m--xvdy5hntvd8cxzq18s8lrf68zwytpj_woxw06dwpqzcnm0j3zeh1oz_dsibrba5g9y-bo4cq9kg6h3xomhz-0ycg8tll9k_2_us67ssnlk7ln7l0bgkbny_bzvnomv5vyaszpow486bheceqniedh3hsp9qoqawmctni613k9fvqr4mphszpty-gdvzebqypcjw794xj2orbswsfojxs_hfr70kiodmczgfvnniu1gyqmy1qtebjapiojgnacisl8tiqbe1regyt6xf-fv_vfm_k2rs3qrp-1csgk2ou7jqqviendkgupsxgdiqacmaqkfmumuf0b1wtdawuhg2q80p0htokrw7ofxs_be7eu-dpm7ffwzv6ejxgvoet6voyktjaji3s7yhncizggqtwik7bhaa7ibjnxmzabblbymlbgjsflpnelkpj5xafvvolz79xyvebusxohnycyrtd6i9olrfoefravisnwmgzgbjtsclegtkasgcgakmco7rbgganottqn3dby1sdblfjxrzfa3yxcjx7wlccp0vzvyexevypapuqvccomdjqykj9ehvqcqxfalsfkgsmhlqhbicfhqggoulwfbyjiuytatc7cfxkv4fr4y64aknqkzr0szisauutmcgwbbvarssmg4lmiwqcdsgzjrgdtsaduyjmykbhojam_iacuurh5miezycrqqmsdpslkwrveenakevkyirjqcunrcwiinexttfbiqbjqjfchdaswhbkcjkbjkdohfrtglcqylkm9hyoavqfj81xmjhdbo_vchssxmhwmqrism2a2o6itzm0uw0pbmkg5oalitghvca1-drgvafs1qwkkilnbwfxb2wm9vqy7tfsysof0rvghje4euvide6qhvavebrjk2d7iqgvkatifgivygqvqbakbwsnatzvrl_cxp4cpadeu0mwg06jjnpuuwoquaiqbkwxjpbesmhlxiqiooaedaqquf216haoxfclj1djckzohn1tvranql_yfygzuxjleszq4rccjqmj8dpsb4n4ijuwktcllymaukeajn6g27zgh4j1aevrdfjruceruz-8ln-_p0bb_fq20j-u1h1t6rybzdgvu0yxpuooivby2ih6qzmpqy-aloa9ka06ewxlidsew1zewzgqnlxlvbrrakmrz_yuwhqovhdpz8ze7hxdct09wuc16kparpncygixsrigiwkkiyql2apbl4luiciyezcjj27uje3hmc2jqj5x5tpvphrxyfpfvbcnamdarw_7ox2bfcfewxmymgtnw3kbolylywkcjai1ryckrjglbpeaoqbdwfkrrbwd8rlrc65fvcaa2srk6x_dydm3blx_rlhunpi4pv-quxrn_ssnobbqigfiquklecbxfhrqdr4aoy4thfomipqiqhcuxfeogmd4oyqbrbj87tjzofzvb577wem38j6samdl-tr3poef-zxe7h67mrlunzzjxe_p1jfowzqrcu3rkln5g64evqrs6wl4tysjtceeyxefa2tvslluvls11io7st6saacnkfp74t9mfvksszm_k-xjvnmqm-kbaeuboiyhqhicrzebpk6ywdnrppmnmdi52dz7xll6ixdxvs_o2pw8u_tqydfux0_fj9wr66r1xer77ohbdywwp3crzdysctwjqo0otxsiieww3qpkkrzf4_o713nzyjsme_1frj3_4mwlrz7rukqbceibftdm5mjxuo3ag53x_quhpm_h4nq8y-k00-kebkovn1pki1a767y3tk7w3xyluhzp5-unl04dqyadrobj-3clhydgpgsfakaantbgyf5wtldwpwh6_51r1gzazpkqfovksuvqhsx3v18zxth31l26eauodsbbo9xfufzs9609bdroau-n0ar2xpwp5rh3m_t778uhkuxaaqae8h0zb1q79z9i4l--_gmfbxbwao5bkaaaaabjru5erkjggg==" }
Comments
Post a Comment