URL Encoding | Community
Skip to main content
July 22, 2014
Solved

URL Encoding

  • July 22, 2014
  • 5 replies
  • 1698 views

Hi 

In certain cases, I need to get a campaign based on its name.  I can use the "get multiple campaigns" call of course.  However, I am running into an issue that certain campaigns have a comma.  

To explain further, if I run the follow through the php function urlencode 

this string: FL-CC0863 Salt Lake City, UT

would become:

FL-CC0863+Salt+Lake+City%2C+UT

Of course I'd expect this to work just fine.  However, the call returns an empty array.  Is the url encoding different for marketo's api?

Thanks,

 

Dan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
Please try passing the string via the API like this:
FL%2DCC0863%20Salt%20Lake%20City%2C%20UT
 
Let me know if that works?
 

5 replies

Accepted solution
July 22, 2014
Please try passing the string via the API like this:
FL%2DCC0863%20Salt%20Lake%20City%2C%20UT
 
Let me know if that works?
 
Josh_Hill13
Level 10
July 22, 2014
Generally avoid using anything other than a dash in your campaigns or programs. Periods and underscores are allowed, but then you get this kind of issue.
July 22, 2014

Thanks, Murtza.  That worked.  Is there a name of this style of urlencoding?  

Josh, I agree.  Unfortunately I just started at my current position, and they've been doing things in a certain way for some time.  That being said, I will definitley bring this issue up with my team.

Thanks!

 

Dan

July 22, 2014

Actually this is still not pulling certain names.  For example:

EM-CC0741 Columbus, OH would be encoded as:

EM%2DCC0741%20Columbus%2C%20OH

Yet no result turns up.

Any ideas?

Thanks,

 

Dan

July 22, 2014
Dan - No specific name. It's just called URL-encoding, as you said. 

That's the same way I would encode your Columbus example, so I am not sure why it is not working for you.