Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting Wrong API version error #3

Closed
kaore opened this issue Dec 22, 2015 · 2 comments
Closed

getting Wrong API version error #3

kaore opened this issue Dec 22, 2015 · 2 comments

Comments

@kaore
Copy link

kaore commented Dec 22, 2015

I'm trying to add a contact and I keep getting a 400 error response:

var apiKey = process.env.MJ_APIKEY_PUBLIC,
apiSecret = process.env.MJ_APIKEY_PRIVATE,
mailjet = require( 'node-mailjet' ),
mj = mailjet.connect( apiKey, apiSecret );

mj.post( 'contact' )
.request( { Email: 'some.random@email.com' } )
.on( 'success', ( response, body ) => {} )
.on( 'error', ( err, response ) => {
  console.log( response.statusCode );     // 400
  console.log( response.statusMessage );  // Wrong API version
} );
@WeshGuillaume
Copy link
Contributor

Hey @kaore !
Thanks for using Mailjet! :)

Your code works on my side actually. Have you got any other information about this ?

Best,
Guillaume

@arnaudbreton
Copy link
Contributor

Hi @kaore,

I lead Developers Relations here at Mailjet and I'm working with @GuillaumeBadi.

Your account is currently using our V1 platform, our original one, now only maintained but not under active development. A new platform, called V3, has now became our official one. In order for you to use the API v3, we need to migrate your account to this new platform.
For that operation to complete, I'll need to learn more about what you're doing with the API v1 so we can help you. Please send me these information over email to api@mailjet.com.

Have a great day,
Arnaud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants