Search Subscribers (Non-PHP implementation)

Discussion in 'General discussions' started by Ronnie, Mar 29, 2019.

  1. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
    I am implementing search subscribers via mailwizz api. Both (1) email search and (2) email search in all lists yields a 404 not found error even though I can verify that the email address in indeed present in the List in Mailiwizz dashboard.

    GET https://www.example.com/api/index.p...arch-by-email-in-all-lists?EMAIL=john@abc.com
    status code: 404
    errorL: {"status":"error","error":"Page not found."}

    GET https://www.example.com/api/index.php/lists/subscribers/search-by-email?EMAIL=john@abc.com

    status code: 404
    errorL: {"status":"error","error":"Page not found."}

    What am I missing here?

    Note: I cannot use Mailiwizz PHP-SDK since we're not using PHP. I can only reverse engineer the SDK, It wouold be awesome if the Mailiwizz docs is kind of generics REST documentation.
     
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,125
    Likes Received:
    2,352
    can you put here the original url so we can take a look ?
     
  3. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
    twisted1919 likes this.
  4. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
  5. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,125
    Likes Received:
    2,352
    @Ronnie - url hashes are unique per campaign, so they are the same for all subscribers. You can get them by looking at the web version of a campaign in behalf of a customer.
    In a url like:
    Code:
    http://domain.com/index.php/campaigns/ba149qktbobf3/track-url/so7916ss0vea1/1a4fac8f6b25a2a86b7df484ca19d4f144eafad8
    
    the hash is 1a4fac8f6b25a2a86b7df484ca19d4f144eafad8
     
  6. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
  7. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,125
    Likes Received:
    2,352
    @Ronnie - For now our API does not provide such info, you will have to write your own endpoint for this.
     
  8. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
    Noted. @twisted1919 . I have another question. I'm creating Emai Templates via the API https://api-docs.mailwizz.com/#templates-create
    I'm sending the post body with name and content, this is a sample response:
    {"status":"success","template_uid":"ov974nl32z89e"}
    I've checked that the email template is created in mailwizz however the template content is not what I have provided. In my post body the content is html strings. Does it need to be escaped or something?
     
  9. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,125
    Likes Received:
    2,352
    @Ronnie - the html template you provide has to be a full template with starting with the <html> tag and ending with </html>
    Did you do that?
     
  10. Ronnie

    Ronnie New Member

    Joined:
    Jan 21, 2019
    Messages:
    11
    Likes Received:
    2
    S.E:
    2019-07-22 23:58:04
    L.T:
    Regular
    L.C:
    2
    @twisted1919 I figured it out by reading mailwizz code, the content should be base64 encoded string.
     
    twisted1919 likes this.
  11. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,125
    Likes Received:
    2,352
    @Ronnie - thanks for the update.
     

Share This Page