Re: Calling visa API from Amazon Glue

rlandge
Regular Visitor

Calling visa API from Amazon Glue

I am calling the visa API from amazon glue which is in the cloud and I am putting the certfile in the s3 bucket.The code that I am using to call the visa API is as follows 

 

key_content = s3.get_object(Bucket=S3_BUCKET, Key=object_key)['Body'].read()
key_cert = tempfile.NamedTemporaryFile(suffix='.p12')
key_cert.write(key_content)
response = post(url,
# verify = ('put the CA certificate pem file path here'),
headers = headers,
auth=(user_id, password),
data = payload,
pkcs12_filename=key_cert.name,
pkcs12_password='********',

)

 

Howver I am getting the error ."Could not deserialize PKCS12 data"

 

Please let me know how to fix this.Any help is appreciated.

8 REPLIES 8
jenn_kh
Community Moderator

Re: Calling visa API from Amazon Glue

Hi @rlandgeThank you for reaching out. An agent is looking into this and will get back to you as soon as possible. If any community member has a possible solution, please feel free to share it here. 

API_Managers
Visa Developer Support Specialist

Re: Calling visa API from Amazon Glue

Hi @rlandge,

 

Please provide the following information so I can investigate the error.

  1. End Point
  2. Request Header
  3. Request Body
  4. Response Header (include the x-correlation-id)
  5. Response Body

You can find the x-correlation-id in the response header.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

rlandge
Regular Visitor

Re: Calling visa API from Amazon Glue

Hi @API_Managers ,

  This error comes prior to making the visa  API call.If you have come across any other solution to make.a visa api call through Amazon Glue (like setting up the certs and keys in S3 and reading from there) through python code it would be helpful.

  

 

API_Managers
Visa Developer Support Specialist

Re: Calling visa API from Amazon Glue

Hi @rlandge,

 

What's the API product that you're using? For a list of our API products, go here




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

rlandge
Regular Visitor

Re: Calling visa API from Amazon Glue

Hi Diana,

 

We are using the VOP Merchant Search/Merchant Locator API  to get locations data and we need to do this from Amazon Glue and need help of setting up certificates and importing certificates/keys in keystore (as per the code posted above) from glue.

 

Thanks

API_Managers
Visa Developer Support Specialist

Re: Calling visa API from Amazon Glue

Hi @rlandge,

 

Please provide the x-correlation-id (located in the Response Header) so we can investigate the error. 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Managers
Visa Developer Support Specialist

Re: Calling visa API from Amazon Glue

Hi @rlandge,

 

Are you still experiencing an error? If so, please provide the following information for further investigation.

  1. End Point
  2. Request Header
  3. Request Body
  4. Response Header (include the x-correlation-id)
  5. Response Body

You can find the x-correlation-id in the response header.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Managers
Visa Developer Support Specialist

Re: Calling visa API from Amazon Glue

Hi @rlandge,

 

I haven't heard from you so I'll take you off my contact list. Please reach out to us at the community if you need any help. 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.