Get OAuth token
Retrieve a new or refresh an existing OAuth token.
Body
- Option 1
- Option 2
Perform the initial token exchange, using the authorization code provided by Bolt's Login Modal.
The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard.
"8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4"
The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard.
"23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8"
The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes.
bolt.account.manage, bolt.account.view, openid The type of OAuth 2.0 grant being utilized.
authorization_code "authorization_code"
Fetched value using OTP value from the Authorization Modal.
"7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms"
A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks.
"xyzABC123"
Response
Access token is successfully fetched
A JSON Web Token (JWT) issued when the request includes the scope open_id.
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsaWNlQGV4YW1wbGUuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV4cCI6MTcwNTY1MTczMSwiZmlyc3RfbmFtZSI6IkFsaWNlIiwiaXNzIjoiaHR0cDovL2FwaS5ib2x0LmNvbSIsImxhc3RfbmFtZSI6IkJha2VyIiwicGhvbmVfbnVtYmVyIjoiKzE0MTU1NTUwMTk5IiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJpYXQiOjE3MDU2NDg0MjF9.Ir0aKx40zfNCZol1DnqchFx9ciHlyZY9y10mndEjOBHhpHif8-7aZl2UoJVs_0Hj-5ArEouUD6n-y1SJD0Wns-gDMoA0Etoc5dT_0zt0Kw5T8FvJWbyKyyGSDEwPFVADIRxDPMpVoHx0C0nwr_GudnIX7YG6p2HCsoGm2C04ZxKpifSixB3-xNB6k9u1ESWh0KjMCYzBQ2x9wbQ_S6kFtio075PFYcZ3iRQz8oD15NsZDd2czzZkRnGTGlpG0sAvScLXMvDDOWBIu-4wvOEOT7avunJQ_rOCYUlyJe7JGh0QllpeJNau8kx-4YGMeFTkeGM_hPIKsRF1e6o_rWp5CMJnmJDPme-zlJxWodyaHNed5XW-4DR7blv_PFOJNrRvymRoTOd74LIpS21GRCNYrphj7N6-TsSfO9hMQ9ehxrgNAryWbVtTM_3VvWyzX-SRa7BcRkS97sokxc04s3cbXra3x6brE3uL1yoOWNf8GDZNkv1uUAnrOZcTuLacrPjkQgOPb-chMiWS1L0Zd1wX3rqpeCyEswsGKxRRkpgwoBaVVQmLB9m51B6SXEvURTcy2Hx8KzgfXQ_-uC-KrniQxWzYms8A1lypKXkEcyMD2E4Q7EB4UeD2qZAk4tZo611uHegaHaEM7EQyFN3nxvibaqFpXzdxVmOCX0_wQr1nDNA"
An access token you can use to make requests on behalf of a Bolt shopper.
"KCqordmSK6_lpkaXaXfGD8LwnKMGGOYy4Ju2IaBXpJI.CzOF7QOmGGQEgIzBjxOEh1FbRdDpzf9zbm9eHrCZ6zw"
The access token's expiration, in seconds.
3600
A refresh token you can use to issue a brand new access token without obtaining a new authorization code.
"4hJYNO4GHvALZoocXoLenfNeFy1RR5ZT6G5JYrFbvkI.Q_PqV0lIszCNoN-85EwD-2nYZOVEepVgJSolx-Jbzrs"
The scope granted to the refresh token. Currently, refreshed token will only grant view permissions.
"bolt.account.view"
The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter. Options include bolt.account.manage, bolt.account.view, openid. Multiple values can be returned as space-separated strings.
"bolt.account.manage openid"
The token_type will always be bearer.
"bearer"