AccessToken
AccessToken API Method
Green Dot will use this method to obtain an access token for the given program code. Green Dot will pass the client Id and secret as basic authorization to the Partner in the request. The Partner will generate an access token and return it back to Green Dot. Green Dot recommends for this access token to expire within 1-2 hours, not exceeding 24 hours (1-day max).
URI: </authentication/PROGRAMCODE/accesstoken
HTTP Method: POST
Request
Field | Type | Format | Required | Description |
---|---|---|---|---|
grant_type | String | Max 100 chars | Yes | Possible values: Client_Credentials |
Sample Request
POST \<<Partner Base URL>/authentication/<<programcode>>/accesstoken
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded
Authorization: Basic c3Bhcms6c3BhcmtQQHNzdzByZA==
X-GD-RequestId: 7944ed36-cad2-474f-bea4-b24d3be8b1b6
Content-Length: 42
grant_type=client_credentials
Response
Field | Type | Format | Description |
---|---|---|---|
access_token | String | Max 250 chars | Generated Access Token |
scope | String | Max 100 chars | Possible values: cashout |
token_type | String | Max 50 chars | Type of the token. Possible values: Bearer |
expires_In | integer | N/A | Expiration time in seconds |
Note: Program code will be provided by Green Dot.
Sample Response
{
"scope": "cashout",
"responseDetails": {
"code": 0,
"subCode": 0,
"codeDescription": "Success",
"subCodeDescription": "Success"
},
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjEiLCJwaS5hdG0iOiJnbXNoIn0.eyJzY29wZSI6IiIsImF1dGhvcml6YXRpb25fZGV0YWlscyI6W10sImNsaWVudF9pZCI6IlVBSUQxMDYzN01OTWljcm9TZXJ2aWNlcyIsImV4cCI6MTcwNzQ3MjcwNX0.d0ohO825c2GaXlBsK_eFx8cyntDzL6f5n-xBfICzGlWpgs1Sop93e36PAiQEse2uScC9QjZoxmg9X312FbJMfipMqbhE5NTZWnL_ofme9gMXDP4OBUwCWnLIgxn5xQS_6JV7z21CEfTtOFi4IHGyaQltxNIE55w-IfQ5npe0S433Np7PC-PGr-7gbB0ouaI-mtti2wGmUXNjb5RqJfpYZXM4nLWhf_O3nIQUSkClIYjjdVSr7bQP2m96OQ8J88-tRdnKy5894UjNYI3yrC6L8r_IfsqhzKjqeAbvongaQiqsNPwEHIHFcU_1FWG70xJYTntIu6HPqGB4CQvjWxHz0VMLku0ygwIH4lG62AEZNHFmSFiUxVNOLAfX-JEIdONbP537MJ5jkx4LuSss6gARbJmdNmO64hK3BgiwKzaatva0FNxzQ4F5J13GHTmMOZcWbEw44ANUPymVtC77mfQmC_LoaboMLei-9Ta1FRSijSoNM0p1m4c8RXina0ptRfz56jpeQ7okaba_dGPvQ0SSbxbiN503P0CJ7TD3UR2DgQdHECb3DRzK-Cbo-k9UNCITbbko3kYKOb9VuXo3JhBs7d6Tf3Cp4ds_9pPyrfIDqGR-ECY4ubcilMtQRblQRMI3qg7zvnjdWjPSK3hSpKunJ7nWCiIQ9lePgo5VLcH2_Lw",
"token_type": "Bearer",
"expires_In": 7199
}
Updated 10 months ago