By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 985 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Access VBA to Connect Http Request Like Python Used

P: 1
I have a Python Code As given below that I wish to use Access VBA to do the same thing.

Here is the Python Code example:

import datetime
import pytz
import hmac
import hashlib
import base64

username = "username"
password = "password"
access_token = "access_token"
secret_key = "secret_key" (pytz.timezone('US/Pacific')).strftime('%m%d%Y')
string_to_sign = username + password + access_token + date
encoded = string_to_sign.encode('UTF-8')
digest =, encoded,hashlib.sha1).digest()
headers=dict(Authorization='NNN {}:{}'.format(access_token, digest))

I need help to determine the functions that I have no concept of it in VBA. For example, hashlib.sha1 ? What can I use with VBA here???

What can I use with VBA for string_to sign.enccode('UTF-8')??

What can I use for the function???

What can I use for the base64.b64encode() function???

What can I use for the dict() function????

If there isn't a VBA version of the function, a description could help me develope a version for VBA.

I am using Office 2013 VBA from Access, etc.

I would appreciate any help you can offer!!!!

Thank You,
May 22 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.