Steps to get Galoy API Authorization Token
2 min readJun 17, 2023
Galoy makes it easy to set up bitcoin payments with their APIs. To make calls to some of these APIs, an authorization token is required.
Below are two quick ways of to get one.
Note: An active phone number is needed to receive an OTP (One time password) to authenticate and create the token
Option 1
- Download and install the Blink mobile app.
- Launch the app, enter your phone number and the OTP you received after to create an account
- Go to settings and tap on build number 3 times.
- Select an environment in the Update Environment section and Tap on Save Changes. Environment information changes based on the selected environment.
- Go back to settings page and tap the phone number field
- Enter a phone number you can receive sms on and tap send sms to receive an OTP. Enter the OTP in the provided field and complete verification
- Tap build number 3 times again. Your token should now be in the Access Token field. Click the Copy access token to copy it
Option 2
- Visit https://wallet.staging.galoy.io/ or https://wallet.mainnet.galoy.io/ (depending on your choice environment) and click on login.
- Enter an active phone number that can receive sms, then verify you are human by solving the onscreen puzzle.
- Make the Graphql call below on postman to get your token
url: https://api.staging.galoy.io/graphql
Method: POST
Query
mutation userLogin($input: UserLoginInput!) {
userLogin(input: $input) {
errors {
message
code
}
authToken
}
}
Variables
{
"input": {
"phone": "phonenumber",
"code": "otp”
}
}
Any of the above options will get you the authorization token to start working with the Galoy APIs