Reply to Post
Skilled Spy
maxtweed
4 Posts
Member since ‎08.10.2012

HTTP 500 Internal Server Error on MMS

My code is python.  No ATT sample, so I downloaded python lib from OneAPI, which is for GSMA v1. I updated so it works with both GSMA v2 and  ATT Restful.  SMS v2 works fine, either as GSMA or ATT.  MMS gives back an HTTP error 500, 'Internal Server Error', for both GSMA and  ATT.  I tried using no attachments or simple text attachements in the MIME, no difference.  I verified that my dev account is set for MMS, and scope is 'MMS,SMS,SPEECH' for the access token. I'm using  'https://api.att.com/rest/mms/2/messaging/outbox'

 

Any idea what is wrong?

 

 

Mime looks like this:

MIME-Version: 1.0

--===============1352573029==
Content-Type: application/x-www-form-urlencoded
MIME-Version: 1.0
Content-Disposition: form-data; name="root-fields"

Address=tel%3A9725551212&Subject=Hello+Max+-+MMS+Framework
--===============1352573029==--

 


Moderator
bs595r
146 Posts
Member since ‎01.13.2012

Re: HTTP 500 Internal Server Error on MMS

Hello,

 

Are you still seeing this problem? I tested and it seems to be working.

 

Cheers,

    --brett

Skilled Spy
maxtweed
4 Posts
Member since ‎08.10.2012

Re: HTTP 500 Internal Server Error on MMS

still same problem, thanks

Moderator
bs595r
146 Posts
Member since ‎01.13.2012

Re: HTTP 500 Internal Server Error on MMS

Hello,

 

So, the MMS API is a little finicky. You need to structure the message as shown in the examples here: https://devconnect-api.att.com/docs/mms-v2/send-mms-v2

 

I noticed your message was different than the examples. I realize that yours is still MIME, but the MMS API is strict on exactly how the MIME parts are structured.

 

Can you try the request again but with how the examples have it structured?

 

Thanks,

     --brett

Skilled Spy
maxtweed
4 Posts
Member since ‎08.10.2012

Re: HTTP 500 Internal Server Error on MMS

I will try again, but have other tasks to do before I get back to it.  I am puzzled that MIME  built by the OneAPI/GSMA Python framework (which was for v1)  doesn't work with either the ATT or the GSMA v2.

Skilled Spy
maxtweed
4 Posts
Member since ‎08.10.2012

Re: HTTP 500 Internal Server Error on MMS

The API example, the ATT example code and the OneAPI/GSMA python MIME code are all a little different; there was no way to tell what server was picky about.  After a lot of trial and error, I got to a 201 Normal Response. 

 

I am now seeing in the resource url an error I don't understand.  The oauth accesstoken works for SMS, and the scope for it was 'SMS,MMS,SPEECH'.  Do you know what this means and what needs to be changed?

{"RequestError": {
    "PolicyException": {
        "MessageId": "POL0001",
        "Text": "Invalid value for part %1" ,
        "Variables" : "accesstoken"    }
}}
Moderator
bs595r
146 Posts
Member since ‎01.13.2012

Re: HTTP 500 Internal Server Error on MMS

Hello,

 

It means that the value of the access token is incorrect. Are you passing the access token in the HTTP header as such:

 

Authorization: Bearer YOUR_ACCESS_TOKEN

 

 

Cheers,

     --brett

  • of 1